Package org.jf.dexlib2.iface
Interface Field
- All Superinterfaces:
Annotatable,Comparable<FieldReference>,FieldReference,Member,Reference
- All Known Implementing Classes:
BuilderField,DexBackedField,FieldRewriter.RewrittenField,ImmutableField,ReflectionField
This class represents a specific field definition in a class.
It also acts as a FieldReference to itself. Any equality/comparison is based on its identity as a FieldReference,
and shouldn't take into account any non-FieldReference specifics of this field.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException -
Method Summary
Modifier and TypeMethodDescriptionintGets the access flags for this field.Set<? extends Annotation> Gets a set of the annotations that are applied to this field.Gets the type of the class that defines this field.Gets the hidden api restrictions for this field.Gets the initial value for this field, if available.getName()Gets the name of this field.getType()Gets the type of this field.Methods inherited from interface org.jf.dexlib2.iface.reference.FieldReference
compareTo, equals, hashCodeMethods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
Method Details
-
getDefiningClass
Gets the type of the class that defines this field.- Specified by:
getDefiningClassin interfaceFieldReference- Specified by:
getDefiningClassin interfaceMember- Returns:
- The type of the class that defines this field
-
getName
Gets the name of this field.- Specified by:
getNamein interfaceFieldReference- Specified by:
getNamein interfaceMember- Returns:
- The name of this field
-
getType
Gets the type of this field.- Specified by:
getTypein interfaceFieldReference- Returns:
- The type of this field
-
getAccessFlags
int getAccessFlags()Gets the access flags for this field. This will be a combination of the AccessFlags.* flags that are marked as compatible for use with a field.- Specified by:
getAccessFlagsin interfaceMember- Returns:
- The access flags for this field
-
getInitialValue
Gets the initial value for this field, if available. Only static field may have an initial value set, but are not required to have an initial value.- Returns:
- The initial value for this field, or null if this field is not a static field, or if this static field does not have an initial value.
-
getAnnotations
Gets a set of the annotations that are applied to this field. The annotations in the returned set are guaranteed to have unique types.- Specified by:
getAnnotationsin interfaceAnnotatable- Returns:
- A set of the annotations that are applied to this field
-
getHiddenApiRestrictions
Gets the hidden api restrictions for this field. This will contain at most 1 normal flag (with isDomainSpecificApiFlag() = false), and 1 domain-specific api flag (with isDomainSpecificApiFlag() = true)- Specified by:
getHiddenApiRestrictionsin interfaceMember- Returns:
- A set of the hidden api restrictions for this field.
-