class Element
extends java.lang.reflect.AccessibleObject
implements java.lang.reflect.Member
Field, a Method or a Constructor. Provides
convenience methods such as isPublic() and isPackagePrivate().| Modifier and Type | Field and Description |
|---|---|
private java.lang.reflect.AccessibleObject |
accessibleObject |
private java.lang.reflect.Member |
member |
| Constructor and Description |
|---|
Element(M member) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
<A extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<A> annotationClass) |
java.lang.annotation.Annotation[] |
getAnnotations() |
java.lang.annotation.Annotation[] |
getDeclaredAnnotations() |
java.lang.Class<?> |
getDeclaringClass() |
int |
getModifiers() |
java.lang.String |
getName() |
TypeToken<?> |
getOwnerType() |
int |
hashCode() |
boolean |
isAbstract()
Returns true if the method is abstract.
|
boolean |
isAccessible() |
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) |
boolean |
isFinal()
Returns
true if this method is final, per Modifier.isFinal(getModifiers()). |
boolean |
isNative()
Returns true if the element is native.
|
boolean |
isPackagePrivate()
Returns true if the element is package-private.
|
boolean |
isPrivate()
Returns true if the element is private.
|
boolean |
isProtected()
Returns true if the element is protected.
|
boolean |
isPublic()
Returns true if the element is public.
|
boolean |
isStatic()
Returns true if the element is static.
|
boolean |
isSynchronized()
Returns true if the method is synchronized.
|
boolean |
isSynthetic() |
(package private) boolean |
isTransient()
Returns true if the field is transient.
|
(package private) boolean |
isVolatile()
Returns true if the field is volatile.
|
void |
setAccessible(boolean flag) |
java.lang.String |
toString() |
private final java.lang.reflect.AccessibleObject accessibleObject
private final java.lang.reflect.Member member
public TypeToken<?> getOwnerType()
public final boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
isAnnotationPresent in interface java.lang.reflect.AnnotatedElementisAnnotationPresent in class java.lang.reflect.AccessibleObjectpublic final <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass)
getAnnotation in interface java.lang.reflect.AnnotatedElementgetAnnotation in class java.lang.reflect.AccessibleObjectpublic final java.lang.annotation.Annotation[] getAnnotations()
getAnnotations in interface java.lang.reflect.AnnotatedElementgetAnnotations in class java.lang.reflect.AccessibleObjectpublic final java.lang.annotation.Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElementgetDeclaredAnnotations in class java.lang.reflect.AccessibleObjectpublic final void setAccessible(boolean flag)
throws java.lang.SecurityException
setAccessible in class java.lang.reflect.AccessibleObjectjava.lang.SecurityExceptionpublic final boolean isAccessible()
isAccessible in class java.lang.reflect.AccessibleObjectpublic java.lang.Class<?> getDeclaringClass()
getDeclaringClass in interface java.lang.reflect.Memberpublic final java.lang.String getName()
getName in interface java.lang.reflect.Memberpublic final int getModifiers()
getModifiers in interface java.lang.reflect.Memberpublic final boolean isSynthetic()
isSynthetic in interface java.lang.reflect.Memberpublic final boolean isPublic()
public final boolean isProtected()
public final boolean isPackagePrivate()
public final boolean isPrivate()
public final boolean isStatic()
public final boolean isFinal()
true if this method is final, per Modifier.isFinal(getModifiers()).
Note that a method may still be effectively "final", or non-overridable when it has no
final keyword. For example, it could be private, or it could be declared by a final
class. To tell whether a method is overridable, use Invokable.isOverridable().
public final boolean isAbstract()
public final boolean isNative()
public final boolean isSynchronized()
final boolean isVolatile()
final boolean isTransient()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object