Class ImmutableField

    • Field Detail

      • definingClass

        @Nonnull
        protected final java.lang.String definingClass
      • name

        @Nonnull
        protected final java.lang.String name
      • type

        @Nonnull
        protected final java.lang.String type
      • accessFlags

        protected final int accessFlags
      • annotations

        @Nonnull
        protected final com.google.common.collect.ImmutableSet<? extends ImmutableAnnotation> annotations
      • hiddenApiRestrictions

        @Nonnull
        protected final com.google.common.collect.ImmutableSet<HiddenApiRestriction> hiddenApiRestrictions
    • Constructor Detail

      • ImmutableField

        public ImmutableField​(@Nonnull
                              java.lang.String definingClass,
                              @Nonnull
                              java.lang.String name,
                              @Nonnull
                              java.lang.String type,
                              int accessFlags,
                              @Nullable
                              EncodedValue initialValue,
                              @Nullable
                              java.util.Collection<? extends Annotation> annotations,
                              @Nullable
                              java.util.Set<HiddenApiRestriction> hiddenApiRestrictions)
      • ImmutableField

        public ImmutableField​(@Nonnull
                              java.lang.String definingClass,
                              @Nonnull
                              java.lang.String name,
                              @Nonnull
                              java.lang.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 Detail

      • getName

        @Nonnull
        public java.lang.String getName()
        Description copied from interface: Field
        Gets the name of this field.
        Specified by:
        getName in interface Field
        Specified by:
        getName in interface FieldReference
        Specified by:
        getName in interface Member
        Returns:
        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 interface Field
        Specified by:
        getType in interface FieldReference
        Returns:
        The type of this field
      • 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 interface Field
        Specified by:
        getAccessFlags in interface Member
        Returns:
        The access flags for this field
      • getInitialValue

        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 interface Field
        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: 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 interface Annotatable
        Specified by:
        getAnnotations in interface Field
        Returns:
        A set of the annotations that are applied to 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 interface Field
        Specified by:
        getHiddenApiRestrictions in interface Member
        Returns:
        A set of the hidden api restrictions for this field.
      • immutableSetOf

        @Nonnull
        public static com.google.common.collect.ImmutableSortedSet<ImmutableField> immutableSetOf​(@Nullable
                                                                                                  java.lang.Iterable<? extends Field> list)