Package java.lang.reflect
Interface Member
- All Known Implementing Classes:
Constructor,Field,Method
public interface Member
Common interface providing access to reflective information on class members.
- See Also:
Field,Constructor,Method
-
Field Summary
-
Method Summary
Modifier and Type Method Description Class<?>getDeclaringClass()Returns the class that declares this member.intgetModifiers()Returns the modifiers for this member.StringgetName()Returns the name of this member.booleanisSynthetic()Indicates whether or not this member is synthetic (artificially introduced by the compiler).
-
Field Details
-
PUBLIC
static final int PUBLICDesignates all public members of a class or interface (including inherited members).- See Also:
- Constant Field Values
-
DECLARED
static final int DECLAREDDesignates all declared members of a class or interface (without inherited members).- See Also:
- Constant Field Values
-
-
Method Details
-
getDeclaringClass
Class<?> getDeclaringClass()Returns the class that declares this member.- Returns:
- the declaring class
-
getModifiers
int getModifiers()Returns the modifiers for this member. TheModifierclass should be used to decode the result.- Returns:
- the modifiers for this member
- See Also:
Modifier
-
getName
String getName()Returns the name of this member.- Returns:
- the name of this member
-
isSynthetic
boolean isSynthetic()Indicates whether or not this member is synthetic (artificially introduced by the compiler).- Returns:
trueif this member is synthetic,falseotherwise
-