Class ImmutableField
java.lang.Object
org.jf.dexlib2.base.reference.BaseReference
org.jf.dexlib2.base.reference.BaseFieldReference
org.jf.dexlib2.immutable.ImmutableField
- All Implemented Interfaces:
Comparable<FieldReference>, Annotatable, Field, Member, FieldReference, Reference
-
Nested Class Summary
Nested classes/interfaces inherited from interface Reference
Reference.InvalidReferenceException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final com.google.common.collect.ImmutableSet<? extends ImmutableAnnotation> private static final ImmutableConverter<ImmutableField, Field> protected final Stringprotected final com.google.common.collect.ImmutableSet<HiddenApiRestriction> protected final ImmutableEncodedValueprotected final Stringprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionImmutableField(String definingClass, String name, String type, int accessFlags, EncodedValue initialValue, Collection<? extends Annotation> annotations, Set<HiddenApiRestriction> hiddenApiRestrictions) ImmutableField(String definingClass, String name, String type, int accessFlags, ImmutableEncodedValue initialValue, com.google.common.collect.ImmutableSet<? extends ImmutableAnnotation> annotations, com.google.common.collect.ImmutableSet<HiddenApiRestriction> hiddenApiRestrictions) -
Method Summary
Modifier and TypeMethodDescriptionintGets the access flags for this field.com.google.common.collect.ImmutableSet<? extends ImmutableAnnotation> Gets a set of the annotations that are applied to this field.Gets the type of the class that defines the referenced field.Gets the hidden api restrictions for this field.Gets the initial value for this field, if available.getName()Gets the name of the referenced field.getType()Gets the type of the referenced field.static com.google.common.collect.ImmutableSortedSet<ImmutableField> immutableSetOf(Iterable<? extends Field> list) static ImmutableFieldMethods inherited from class BaseFieldReference
compareTo, equals, hashCode, toStringMethods inherited from class BaseReference
validateReferenceMethods inherited from interface FieldReference
compareTo, equals, hashCodeMethods inherited from interface Reference
validateReference
-
Field Details
-
definingClass
-
name
-
type
-
accessFlags
protected final int accessFlags -
initialValue
-
annotations
@Nonnull protected final com.google.common.collect.ImmutableSet<? extends ImmutableAnnotation> annotations -
CONVERTER
-
-
Constructor Details
-
ImmutableField
public ImmutableField(@Nonnull String definingClass, @Nonnull String name, @Nonnull String type, int accessFlags, @Nullable EncodedValue initialValue, @Nullable Collection<? extends Annotation> annotations, @Nullable Set<HiddenApiRestriction> hiddenApiRestrictions) -
ImmutableField
public ImmutableField(@Nonnull String definingClass, @Nonnull String name, @Nonnull String type, int accessFlags, @Nullable ImmutableEncodedValue initialValue, @Nullable com.google.common.collect.ImmutableSet<? extends ImmutableAnnotation> annotations, @Nullable com.google.common.collect.ImmutableSet<HiddenApiRestriction> hiddenApiRestrictions)
-
-
Method Details
-
of
-
getDefiningClass
Description copied from interface:FieldReferenceGets the type of the class that defines the referenced field.- Specified by:
getDefiningClassin interfaceField- Specified by:
getDefiningClassin interfaceFieldReference- Specified by:
getDefiningClassin interfaceMember- Returns:
- The type of the class that defines the referenced field
-
getName
Description copied from interface:FieldReferenceGets the name of the referenced field. -
getType
Description copied from interface:FieldReferenceGets the type of the referenced field.- Specified by:
getTypein interfaceField- Specified by:
getTypein interfaceFieldReference- Returns:
- The type of the referenced field
-
getAccessFlags
public int getAccessFlags()Description copied from interface:FieldGets 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 interfaceField- Specified by:
getAccessFlagsin interfaceMember- Returns:
- The access flags for this field
-
getInitialValue
Description copied from interface:FieldGets 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:
getInitialValuein 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 com.google.common.collect.ImmutableSet<? extends ImmutableAnnotation> getAnnotations()Description copied from interface:FieldGets 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- Specified by:
getAnnotationsin interfaceField- Returns:
- A set of the annotations that are applied to this field
-
getHiddenApiRestrictions
Description copied from interface:FieldGets 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 interfaceField- Specified by:
getHiddenApiRestrictionsin interfaceMember- Returns:
- A set of the hidden api restrictions for this field.
-
immutableSetOf
@Nonnull public static com.google.common.collect.ImmutableSortedSet<ImmutableField> immutableSetOf(@Nullable Iterable<? extends Field> list)
-