public class FieldInfo extends Object implements Comparable<FieldInfo>
Constructor and Description |
---|
FieldInfo(String className,
String fieldName,
int modifiers,
String typeDescriptor,
Object constValue,
List<AnnotationInfo> annotationInfo) |
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<AnnotationInfo> |
getAnnotationInfo()
Get a list of annotations on this field, along with any annotation parameter values, wrapped in
AnnotationInfo objects, or the empty list if none.
|
List<String> |
getAnnotationNames()
Returns the names of unique annotations on the field, or the empty list if none.
|
List<Class<?>> |
getAnnotationTypes()
Returns Class references for the unique 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.
|
TypeParser.TypeSignature |
getTypeSignature()
Returns the type signature for the field.
|
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 TypeParser.TypeSignature getTypeSignature()
public Class<?> getType() throws IllegalArgumentException
IllegalArgumentException
- if the field type could not be loaded.public String getTypeStr()
public Object getConstFinalValue()
public List<String> getAnnotationNames()
public List<Class<?>> getAnnotationTypes() throws IllegalArgumentException
IllegalArgumentException
- if the annotation type could not be loaded.public List<AnnotationInfo> getAnnotationInfo()
public boolean equals(Object obj)
public int hashCode()
public int compareTo(FieldInfo other)
compareTo
in interface Comparable<FieldInfo>
Copyright © 2018. All rights reserved.