public abstract class MemberLiteral<T,M extends java.lang.reflect.Member & java.lang.reflect.AnnotatedElement>
extends java.lang.Object
TypeLiteral| Modifier | Constructor and Description |
|---|---|
protected |
MemberLiteral(M member,
TypeLiteral<T> declaringType) |
| Modifier and Type | Method and Description |
|---|---|
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> type)
Returns this member's annotation of the passed type or
null if no
matching annotation is present. |
java.lang.annotation.Annotation[] |
getAnnotations()
Returns this member's annotations.
|
java.lang.annotation.Annotation |
getBindingAnnotation()
Returns this member's binding annotation or
null if no such
annotation is present. |
protected java.lang.annotation.Annotation |
getBindingAnnotation(java.lang.annotation.Annotation[] annotations) |
TypeLiteral<T> |
getDeclaringType()
Returns the type declaring this member.
|
protected M |
getMember() |
int |
getModifiers()
Returns this member's modifiers.
|
java.lang.String |
getName()
Returns this member's name.
|
java.lang.Class<?> |
getRawDeclaringType()
Returns this member's raw (i.e.
|
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Returns
true if an annotation of the passed type is present on
this member. |
boolean |
isDefaultAccess()
Returns
true if this member is declared as default access. |
boolean |
isPrivate()
Returns
true if this member is declared private. |
boolean |
isPublic()
Returns
true if this member is declared public. |
boolean |
isStatic()
Returns
true if this member is declared static. |
protected MemberLiteral(M member, TypeLiteral<T> declaringType)
public TypeLiteral<T> getDeclaringType()
public java.lang.String getName()
public java.lang.Class<?> getRawDeclaringType()
public int getModifiers()
public java.lang.annotation.Annotation[] getAnnotations()
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> type)
null if no
matching annotation is present.type - annotation typenull if no matching annotation
existspublic boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> type)
true if an annotation of the passed type is present on
this member.type - annotation type to check fortrue if the annotation is presentpublic java.lang.annotation.Annotation getBindingAnnotation()
null if no such
annotation is present.nullpublic boolean isDefaultAccess()
true if this member is declared as default access.true if default accesspublic boolean isPublic()
true if this member is declared public.true if publicpublic boolean isPrivate()
true if this member is declared private.true if privatepublic boolean isStatic()
true if this member is declared static.true if staticprotected java.lang.annotation.Annotation getBindingAnnotation(java.lang.annotation.Annotation[] annotations)
protected M getMember()