public class FieldInfo extends Object implements Comparable<FieldInfo>
Constructor and Description |
---|
FieldInfo(String className,
String fieldName,
int modifiers,
String typeDescriptor,
Object constValue,
List<String> annotationNames) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FieldInfo other)
Sort in order of class name then field name
|
boolean |
equals(Object obj)
Use class name and field name for equals().
|
int |
getAccessFlags()
Returns the access flags of the field.
|
List<String> |
getAnnotationNames()
Returns the names of annotations on the field, or the empty list if none.
|
List<Class<?>> |
getAnnotationTypes()
Returns Class references for the annotations on this field.
|
String |
getClassName()
Get the name of the class this method is part of.
|
Object |
getConstFinalValue()
Returns the constant final initializer value of the field, or null if none.
|
String |
getFieldName()
Returns the name of the field.
|
String |
getModifiers()
Get the field modifiers as a string, e.g.
|
Class<?> |
getType()
Returns the Class> reference for the field.
|
String |
getTypeDescriptor()
Returns the internal type descriptor for the field, e.g.
|
String |
getTypeStr()
Returns the type of the field, in string representation (e.g.
|
int |
hashCode()
Use hash code of class name and field name.
|
boolean |
isFinal()
Returns true if this field is final.
|
boolean |
isPackagePrivate()
Returns true if this field is package-private.
|
boolean |
isPrivate()
Returns true if this field is private.
|
boolean |
isProtected()
Returns true if this field is protected.
|
boolean |
isPublic()
Returns true if this field is public.
|
boolean |
isStatic()
Returns true if this field is static.
|
boolean |
isTransient()
Returns true if this field is a transient field.
|
String |
toString() |
public String getClassName()
public String getFieldName()
public String getModifiers()
public boolean isPublic()
public boolean isPrivate()
public boolean isProtected()
public boolean isPackagePrivate()
public boolean isStatic()
public boolean isFinal()
public boolean isTransient()
public int getAccessFlags()
public String getTypeDescriptor()
public String getTypeStr()
public Class<?> getType() throws IllegalArgumentException
IllegalArgumentException
- if the field type could not be loaded.public Object getConstFinalValue()
public List<String> getAnnotationNames()
public List<Class<?>> getAnnotationTypes() throws IllegalArgumentException
IllegalArgumentException
- if the annotation type could not be loaded.public boolean equals(Object obj)
public int hashCode()
public int compareTo(FieldInfo other)
compareTo
in interface Comparable<FieldInfo>
Copyright © 2017. All rights reserved.