public abstract class MemberLiteral<T,M extends Member & AnnotatedElement> extends Object
TypeLiteral
Modifier | Constructor and Description |
---|---|
protected |
MemberLiteral(M member,
TypeLiteral<T> declaringType) |
Modifier and Type | Method and Description |
---|---|
<T extends Annotation> |
getAnnotation(Class<T> type)
Returns this member's annotation of the passed type or
null if no
matching annotation is present. |
Annotation[] |
getAnnotations()
Returns this member's annotations.
|
Annotation |
getBindingAnnotation()
Returns this member's binding annotation or
null if no such
annotation is present. |
protected Annotation |
getBindingAnnotation(Annotation[] annotations) |
TypeLiteral<T> |
getDeclaringType()
Returns the type declaring this member.
|
protected M |
getMember() |
int |
getModifiers()
Returns this member's modifiers.
|
String |
getName()
Returns this member's name.
|
Class<?> |
getRawDeclaringType()
Returns this member's raw (i.e.
|
boolean |
isAnnotationPresent(Class<? extends 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 String getName()
public Class<?> getRawDeclaringType()
public int getModifiers()
public Annotation[] getAnnotations()
public <T extends Annotation> T getAnnotation(Class<T> type)
null
if no
matching annotation is present.type
- annotation typenull
if no matching annotation
existspublic boolean isAnnotationPresent(Class<? extends 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 Annotation getBindingAnnotation()
null
if no such
annotation is present.null
public 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 Annotation getBindingAnnotation(Annotation[] annotations)
protected M getMember()
Copyright © 2008–2018. All rights reserved.