Class ImmutableProto.MetaAnnotated

  • Enclosing class:
    ImmutableProto

    @Immutable
    public static final class ImmutableProto.MetaAnnotated
    extends Proto.MetaAnnotated
    Immutable implementation of Proto.MetaAnnotated.

    Use the static factory method to create immutable instances: ImmutableProto.MetaAnnotated.of().

    • Field Detail

      • element

        private final javax.lang.model.element.Element element
      • qualifiedName

        private final java.lang.String qualifiedName
      • encodings

        private final transient java.util.Set<EncodingInfo> encodings
      • datatypeEnabled

        private final transient com.google.common.base.Optional<DataMirror> datatypeEnabled
      • style

        private final transient com.google.common.base.Optional<StyleInfo> style
      • depluralize

        private final transient com.google.common.base.Optional<java.lang.String[]> depluralize
      • serialVersion

        private final transient com.google.common.base.Optional<java.lang.Long> serialVersion
      • isSerialStructural

        private final transient boolean isSerialStructural
      • isJacksonSerialized

        private final transient boolean isJacksonSerialized
      • isJacksonDeserialized

        private final transient boolean isJacksonDeserialized
      • isJacksonJsonTypeInfo

        private final transient boolean isJacksonJsonTypeInfo
      • isJsonQualifier

        private final transient boolean isJsonQualifier
      • isEnclosing

        private final transient boolean isEnclosing
    • Constructor Detail

      • MetaAnnotated

        private MetaAnnotated​(javax.lang.model.element.Element element,
                              java.lang.String qualifiedName,
                              Proto.Environment environment)
    • Method Detail

      • element

        public javax.lang.model.element.Element element()
        Specified by:
        element in class Proto.MetaAnnotated
        Returns:
        The value of the element attribute
      • qualifiedName

        public java.lang.String qualifiedName()
        Specified by:
        qualifiedName in class Proto.MetaAnnotated
        Returns:
        The value of the qualifiedName attribute
      • datatypeEnabled

        public com.google.common.base.Optional<DataMirror> datatypeEnabled()
        Overrides:
        datatypeEnabled in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the datatypeEnabled attribute
      • style

        public com.google.common.base.Optional<StyleInfo> style()
        Overrides:
        style in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the style attribute
      • depluralize

        public com.google.common.base.Optional<java.lang.String[]> depluralize()
        Overrides:
        depluralize in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the depluralize attribute
      • serialVersion

        public com.google.common.base.Optional<java.lang.Long> serialVersion()
        Overrides:
        serialVersion in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the serialVersion attribute
      • isSerialStructural

        public boolean isSerialStructural()
        Overrides:
        isSerialStructural in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the isSerialStructural attribute
      • isJacksonSerialized

        public boolean isJacksonSerialized()
        Overrides:
        isJacksonSerialized in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the isJacksonSerialized attribute
      • isJacksonDeserialized

        public boolean isJacksonDeserialized()
        Overrides:
        isJacksonDeserialized in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the isJacksonDeserialized attribute
      • isJacksonJsonTypeInfo

        public boolean isJacksonJsonTypeInfo()
        Overrides:
        isJacksonJsonTypeInfo in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the isJacksonJsonTypeInfo attribute
      • isJsonQualifier

        public boolean isJsonQualifier()
        Overrides:
        isJsonQualifier in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the isJsonQualifier attribute
      • isEnclosing

        public boolean isEnclosing()
        Overrides:
        isEnclosing in class Proto.MetaAnnotated
        Returns:
        The computed-at-construction value of the isEnclosing attribute
      • withElement

        public final ImmutableProto.MetaAnnotated withElement​(javax.lang.model.element.Element value)
        Copy the current immutable object by setting a value for the element attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for element
        Returns:
        A modified copy of the this object
      • withQualifiedName

        public final ImmutableProto.MetaAnnotated withQualifiedName​(java.lang.String value)
        Copy the current immutable object by setting a value for the qualifiedName attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for qualifiedName
        Returns:
        A modified copy of the this object
      • withEnvironment

        public final ImmutableProto.MetaAnnotated withEnvironment​(Proto.Environment value)
        Copy the current immutable object by setting a value for the environment attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for environment
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of MetaAnnotated that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Returns a constant hash code value.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value MetaAnnotated.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static ImmutableProto.MetaAnnotated of​(javax.lang.model.element.Element element,
                                                      java.lang.String qualifiedName,
                                                      Proto.Environment environment)
        Construct a new immutable MetaAnnotated instance.
        Parameters:
        element - The value for the element attribute
        qualifiedName - The value for the qualifiedName attribute
        environment - The value for the environment attribute
        Returns:
        An immutable MetaAnnotated instance
      • copyOf

        public static ImmutableProto.MetaAnnotated copyOf​(Proto.MetaAnnotated instance)
        Creates an immutable copy of a Proto.MetaAnnotated value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable MetaAnnotated instance