Class ReflectionField
- java.lang.Object
-
- org.jf.dexlib2.base.reference.BaseReference
-
- org.jf.dexlib2.base.reference.BaseFieldReference
-
- org.jf.dexlib2.analysis.reflection.ReflectionField
-
- All Implemented Interfaces:
java.lang.Comparable<FieldReference>
,Annotatable
,Field
,Member
,FieldReference
,Reference
public class ReflectionField extends BaseFieldReference implements Field
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException
-
-
Constructor Summary
Constructors Constructor Description ReflectionField(java.lang.reflect.Field field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAccessFlags()
Gets the access flags for this field.java.util.Set<? extends Annotation>
getAnnotations()
Gets a set of the annotations that are applied to this field.java.lang.String
getDefiningClass()
Gets the type of the class that defines this field.java.util.Set<HiddenApiRestriction>
getHiddenApiRestrictions()
Gets the hidden api restrictions for this field.EncodedValue
getInitialValue()
Gets the initial value for this field, if available.java.lang.String
getName()
Gets the name of this field.java.lang.String
getType()
Gets the type of this field.-
Methods inherited from class org.jf.dexlib2.base.reference.BaseFieldReference
compareTo, equals, hashCode, toString
-
Methods inherited from class org.jf.dexlib2.base.reference.BaseReference
validateReference
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jf.dexlib2.iface.reference.FieldReference
compareTo, equals, hashCode
-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
getAccessFlags
public int getAccessFlags()
Description copied from interface:Field
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:
getAccessFlags
in interfaceField
- Specified by:
getAccessFlags
in interfaceMember
- Returns:
- The access flags for this field
-
getInitialValue
@Nullable public EncodedValue getInitialValue()
Description copied from interface:Field
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.- Specified by:
getInitialValue
in interfaceField
- 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
@Nonnull public java.util.Set<? extends Annotation> getAnnotations()
Description copied from interface:Field
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:
getAnnotations
in interfaceAnnotatable
- Specified by:
getAnnotations
in interfaceField
- Returns:
- A set of the annotations that are applied to this field
-
getDefiningClass
@Nonnull public java.lang.String getDefiningClass()
Description copied from interface:Field
Gets the type of the class that defines this field.- Specified by:
getDefiningClass
in interfaceField
- Specified by:
getDefiningClass
in interfaceFieldReference
- Specified by:
getDefiningClass
in interfaceMember
- Returns:
- The type of the class that defines this field
-
getName
@Nonnull public java.lang.String getName()
Description copied from interface:Field
Gets the name of this field.
-
getType
@Nonnull public java.lang.String getType()
Description copied from interface:Field
Gets the type of this field.- Specified by:
getType
in interfaceField
- Specified by:
getType
in interfaceFieldReference
- Returns:
- The type of this field
-
getHiddenApiRestrictions
@Nonnull public java.util.Set<HiddenApiRestriction> getHiddenApiRestrictions()
Description copied from interface:Field
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:
getHiddenApiRestrictions
in interfaceField
- Specified by:
getHiddenApiRestrictions
in interfaceMember
- Returns:
- A set of the hidden api restrictions for this field.
-
-