public class MirrorField
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
MirrorClass<?> |
declaringClass() |
boolean |
equals(java.lang.Object o) |
java.lang.Object |
get(java.lang.Object instance)
Retrieves the value of this field for the given instance
|
<A extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<A> clazz)
Retrieves the given annotation from this field
|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
If this field has the given annotation
|
int |
hashCode() |
boolean |
hasModifier(int modifier) |
boolean |
isFinal() |
boolean |
isNotFinal() |
boolean |
isNotStatic() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
int |
modifiers() |
java.lang.String |
name() |
void |
set(java.lang.Object instance,
java.lang.Object value)
Sets the value of this field on the given instance
|
MirrorField |
setAccessible(boolean accessible)
Sets this field to be accessible
|
java.lang.reflect.Field |
unwrap() |
public java.lang.String name()
public MirrorClass<?> declaringClass()
public MirrorField setAccessible(boolean accessible)
accessible
- public java.lang.Object get(java.lang.Object instance)
instance
- The instance for which to retrieve the fieldField.get(Object)
public void set(java.lang.Object instance, java.lang.Object value)
instance
- The instance for which to set the fieldvalue
- The new value of the fieldpublic java.lang.reflect.Field unwrap()
Field
public int modifiers()
public boolean isStatic()
public boolean isNotStatic()
public boolean isFinal()
public boolean isNotFinal()
public boolean isPublic()
public boolean isProtected()
public boolean isPrivate()
public boolean hasModifier(int modifier)
modifier
- public boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)
clazz
- The annotation classpublic <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> clazz)
A
- The annotation typeclazz
- The annotation classpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object