public class FieldType
extends java.lang.Object
Field instance that resolves generics meta-data upon creation.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass) |
java.lang.Class<?> |
getArrayContentType() |
java.lang.annotation.Annotation[] |
getDeclaredAnnotations() |
java.lang.String |
getName() |
java.lang.Class<?> |
getType() |
java.lang.Class<?> |
getTypeArgument(int index) |
int |
getTypeArgumentCount() |
int |
hashCode() |
boolean |
isArray() |
boolean |
isAssignableTo(java.lang.Class<?> superClass) |
boolean |
isConcrete() |
boolean |
isFinal() |
boolean |
isModifiable() |
void |
set(java.lang.Object instance,
java.lang.Object value)
Sets the wrapped field on the specified instance argument to the specified new value.
|
java.lang.String |
toString() |
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.Class<?> getType()
public java.lang.String getName()
public boolean isAssignableTo(java.lang.Class<?> superClass)
superClass - a class to checkpublic boolean isFinal()
public boolean isModifiable()
public boolean isConcrete()
public boolean isArray()
public java.lang.Class<?> getArrayContentType()
public int getTypeArgumentCount()
public java.lang.Class<?> getTypeArgument(int index)
index - index of generic argument to returnjava.lang.IndexOutOfBoundsException - if index less than 0 or index + 1 greater than number of generic argumentspublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
T - annotation class typeannotationClass - annotation classpublic java.lang.annotation.Annotation[] getDeclaredAnnotations()
public void set(java.lang.Object instance,
java.lang.Object value)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
AccessibleObject.setAccessible(boolean).instance - the object whose field should be modifiedvalue - the new value for the field of instance being modifiedjava.lang.IllegalArgumentException - see Field.set(Object, Object)java.lang.IllegalAccessException - see Field.set(Object, Object)public java.lang.String toString()
toString in class java.lang.Object