Java Code Examples for java.lang.reflect.Member#isSynthetic()

The following examples show how to use java.lang.reflect.Member#isSynthetic() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClassUtils.java    From graphql-spqr with Apache License 2.0 5 votes vote down vote up
public static boolean isReal(Member member) {
    Objects.requireNonNull(member, "Member must not be null");
    if (member instanceof Method) {
        return isReal((Method) member);
    }
    if (member instanceof Field) {
        return isReal(((Field) member));
    }
    return member.isSynthetic();
}
 
Example 2
Source File: PlantRenderer.java    From Java2PlantUML with Apache License 2.0 5 votes vote down vote up
@Override
public void addMember(Member m, List<String> plantMembers) {
    if (m.isSynthetic()) {
        logger.log(Level.INFO, "skiping synthetic " + m);
        return;
    }
    String name = TypesHelper.getSimpleName(m.getName());
    String modif = Modifiers.forModifier(m.getModifiers()).toString();
    String returnType = (m instanceof Method)
            ? " : " + TypesHelper.getSimpleName(((Method) m).getReturnType().getName())
            : "";
    String params = buildParams(m);
    String msg = String.format("%s %s(%s) %s", modif, name, params, returnType);
    plantMembers.add(msg);
}
 
Example 3
Source File: ClassDescription.java    From ldp4j with Apache License 2.0 5 votes vote down vote up
@Override
protected void processType(Member type) {
	super.addTitle("Member");
	super.addField("name", type.getName());
	super.addField("declaringClass", type.getDeclaringClass());
	super.addField("modifiers", Modifier.toString(type.getModifiers()));
	super.addField("synthetic", type.isSynthetic());
}
 
Example 4
Source File: MoreTypes.java    From crate with Apache License 2.0 5 votes vote down vote up
private MemberImpl(Member member) {
    this.declaringClass = member.getDeclaringClass();
    this.name = member.getName();
    this.modifiers = member.getModifiers();
    this.synthetic = member.isSynthetic();
    this.memberType = memberType(member);
    this.memberKey = memberKey(member);
}
 
Example 5
Source File: MemberUtils.java    From Android-BluetoothKit with Apache License 2.0 4 votes vote down vote up
static boolean isAccessible(final Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 6
Source File: MemberUtils.java    From DroidPlugin with GNU Lesser General Public License v3.0 4 votes vote down vote up
static boolean isAccessible(final Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 7
Source File: MemberUtils.java    From kcanotify_h5-master with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Returns whether a Member is accessible.
 *
 * @param m Member to check
 * @return true if <code>m</code> is accessible
 */
static boolean isAccessible(Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 8
Source File: FieldUtils.java    From arthas with Apache License 2.0 2 votes vote down vote up
/**
 * Returns whether a {@link Member} is accessible.
 * @param m Member to check
 * @return {@code true} if <code>m</code> is accessible
 */
static boolean isAccessible(final Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 9
Source File: MemberUtils.java    From AndHook with MIT License 2 votes vote down vote up
/**
 * Returns whether a Member is accessible.
 *
 * @param m Member to check
 * @return true if <code>m</code> is accessible
 */
static boolean isAccessible(Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 10
Source File: MemberUtils.java    From ehcache3 with Apache License 2.0 2 votes vote down vote up
/**
 * Returns whether a {@link Member} is accessible.
 * @param m Member to check
 * @return {@code true} if <code>m</code> is accessible
 */
static boolean isAccessible(final Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 11
Source File: MemberUtils.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Check a Member for basic accessibility.
 * @param m Member to check
 * @return true if <code>m</code> is accessible
 */
static boolean isAccessible(Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 12
Source File: MemberUtils.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether a Member is accessible.
 * @param m Member to check
 * @return true if <code>m</code> is accessible
 */
static boolean isAccessible(Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 13
Source File: MemberUtils.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether a Member is accessible.
 * @param m Member to check
 * @return true if <code>m</code> is accessible
 */
static boolean isAccessible(final Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 14
Source File: MemberUtils.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns whether a Member is accessible.
 * @param m Member to check
 * @return true if <code>m</code> is accessible
 */
static boolean isAccessible(Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}
 
Example 15
Source File: MemberUtils.java    From xposed-art with Apache License 2.0 2 votes vote down vote up
/**
 * Returns whether a Member is accessible.
 * @param m Member to check
 * @return true if <code>m</code> is accessible
 */
static boolean isAccessible(Member m) {
    return m != null && Modifier.isPublic(m.getModifiers()) && !m.isSynthetic();
}