public class FieldInfo extends Object implements Comparable<FieldInfo>
Constructor and Description |
---|
FieldInfo(String className,
String fieldName,
int modifiers,
String typeDescriptorStr,
String typeSignatureStr,
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().
|
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.
|
int |
getModifiers()
Returns the access flags of the field.
|
String |
getModifierStr()
Get the field modifiers as a string, e.g.
|
String |
getModifierStrs()
Deprecated.
|
Class<?> |
getType()
Returns the Class> reference for the field.
|
String |
getTypeDescriptorStr()
Returns the type descriptor string for the field, without type parameters, e.g.
|
TypeSignature |
getTypeSignature()
Returns the type signature for the field.
|
String |
getTypeSignatureStr()
Returns the Java type signature string for the method.
|
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()
@Deprecated public String getModifierStrs()
public String getModifierStr()
public boolean isPublic()
public boolean isPrivate()
public boolean isProtected()
public boolean isPackagePrivate()
public boolean isStatic()
public boolean isFinal()
public boolean isTransient()
public int getModifiers()
public String getTypeDescriptorStr()
public String getTypeSignatureStr()
public 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.