Class ImmutableProto.DeclaringPackage

Enclosing class:
ImmutableProto

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

Use the builder to create immutable instances: ImmutableProto.DeclaringPackage.builder().

  • Field Details

    • environment

      private final Proto.Environment environment
    • interner

      private final Proto.Interning interner
    • element

      private final PackageElement element
    • simpleName

      private final transient String simpleName
    • name

      private final transient String name
    • STAGE_INITIALIZING

      private static final byte STAGE_INITIALIZING
      See Also:
    • STAGE_UNINITIALIZED

      private static final byte STAGE_UNINITIALIZED
      See Also:
    • STAGE_INITIALIZED

      private static final byte STAGE_INITIALIZED
      See Also:
    • initShim

      private transient volatile ImmutableProto.DeclaringPackage.InitShim initShim
    • lazyInitBitmap

      private transient volatile long lazyInitBitmap
    • INCLUDE_LAZY_INIT_BIT

      private static final long INCLUDE_LAZY_INIT_BIT
      See Also:
    • include

      private transient com.google.common.base.Optional<IncludeMirror> include
    • BUILDER_INCLUDE_LAZY_INIT_BIT

      private static final long BUILDER_INCLUDE_LAZY_INIT_BIT
      See Also:
    • builderInclude

      private transient com.google.common.base.Optional<FIncludeMirror> builderInclude
    • TYPE_ADAPTERS_LAZY_INIT_BIT

      private static final long TYPE_ADAPTERS_LAZY_INIT_BIT
      See Also:
    • typeAdapters

      private transient com.google.common.base.Optional<TypeAdaptersMirror> typeAdapters
    • OK_TYPE_ADAPTERS_LAZY_INIT_BIT

      private static final long OK_TYPE_ADAPTERS_LAZY_INIT_BIT
      See Also:
    • okTypeAdapters

      private transient com.google.common.base.Optional<OkTypeAdaptersMirror> okTypeAdapters
    • INCLUDED_TYPES_LAZY_INIT_BIT

      private static final long INCLUDED_TYPES_LAZY_INIT_BIT
      See Also:
    • includedTypes

      private transient List<TypeElement> includedTypes
    • BUILDER_INCLUDED_TYPES_LAZY_INIT_BIT

      private static final long BUILDER_INCLUDED_TYPES_LAZY_INIT_BIT
      See Also:
    • builderIncludedTypes

      private transient List<TypeElement> builderIncludedTypes
    • META_ANNOTATED_LAZY_INIT_BIT

      private static final long META_ANNOTATED_LAZY_INIT_BIT
      See Also:
    • metaAnnotated

      private transient List<Proto.MetaAnnotated> metaAnnotated
    • JACKSON_SERIALIZE_MODE_LAZY_INIT_BIT

      private static final long JACKSON_SERIALIZE_MODE_LAZY_INIT_BIT
      See Also:
    • jacksonSerializeMode

      private transient Proto.JacksonMode jacksonSerializeMode
    • IS_JACKSON_DESERIALIZED_ANNOTATED_LAZY_INIT_BIT

      private static final long IS_JACKSON_DESERIALIZED_ANNOTATED_LAZY_INIT_BIT
      See Also:
    • isJacksonDeserializedAnnotated

      private transient boolean isJacksonDeserializedAnnotated
    • NAMED_PARENT_PACKAGE_LAZY_INIT_BIT

      private static final long NAMED_PARENT_PACKAGE_LAZY_INIT_BIT
      See Also:
    • namedParentPackage

      private transient com.google.common.base.Optional<Proto.DeclaringPackage> namedParentPackage
    • IS_JACKSON_SERIALIZED_LAZY_INIT_BIT

      private static final long IS_JACKSON_SERIALIZED_LAZY_INIT_BIT
      See Also:
    • isJacksonSerialized

      private transient boolean isJacksonSerialized
    • IS_JACKSON_DESERIALIZED_LAZY_INIT_BIT

      private static final long IS_JACKSON_DESERIALIZED_LAZY_INIT_BIT
      See Also:
    • isJacksonDeserialized

      private transient boolean isJacksonDeserialized
    • IS_JACKSON_JSON_TYPE_INFO_LAZY_INIT_BIT

      private static final long IS_JACKSON_JSON_TYPE_INFO_LAZY_INIT_BIT
      See Also:
    • isJacksonJsonTypeInfo

      private transient boolean isJacksonJsonTypeInfo
    • IS_SERIAL_STRUCTURAL_LAZY_INIT_BIT

      private static final long IS_SERIAL_STRUCTURAL_LAZY_INIT_BIT
      See Also:
    • isSerialStructural

      private transient boolean isSerialStructural
    • SERIAL_VERSION_LAZY_INIT_BIT

      private static final long SERIAL_VERSION_LAZY_INIT_BIT
      See Also:
    • serialVersion

      private transient com.google.common.base.Optional<Long> serialVersion
    • STYLE_LAZY_INIT_BIT

      private static final long STYLE_LAZY_INIT_BIT
      See Also:
    • style

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

      private static final long DEPLURALIZE_LAZY_INIT_BIT
      See Also:
    • depluralize

      private transient com.google.common.base.Optional<String[]> depluralize
    • DATATYPE_ENABLED_LAZY_INIT_BIT

      private static final long DATATYPE_ENABLED_LAZY_INIT_BIT
      See Also:
    • datatypeEnabled

      private transient com.google.common.base.Optional<DataMirror> datatypeEnabled
  • Constructor Details

  • Method Details

    • environment

      Proto.Environment environment()
      Specified by:
      environment in class Proto.Diagnosable
      Returns:
      The value of the environment attribute
    • interner

      Proto.Interning interner()
      used to intern packaged created internally
      Specified by:
      interner in class Proto.AbstractDeclaring
    • element

      public PackageElement element()
      Description copied from class: Proto.Diagnosable
      Element suitable for reporting as a source of declaration which might causing problems.
      Specified by:
      element in class Proto.DeclaringPackage
      Returns:
      The value of the element attribute
    • simpleName

      public String simpleName()
      Overrides:
      simpleName in class Proto.DeclaringPackage
      Returns:
      The computed-at-construction value of the simpleName attribute
    • name

      public String name()
      Name is the only equivalence attribute. Basically packages are interned by name.
      Overrides:
      name in class Proto.DeclaringPackage
      Returns:
      package name
    • withEnvironment

      public final ImmutableProto.DeclaringPackage 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
    • withInterner

      public final ImmutableProto.DeclaringPackage withInterner(Proto.Interning value)
      Copy the current immutable object by setting a value for the interner attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for interner
      Returns:
      A modified copy of the this object
    • withElement

      public final ImmutableProto.DeclaringPackage withElement(PackageElement 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
    • equals

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

      private boolean equalTo(int synthetic, ImmutableProto.DeclaringPackage another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DeclaringPackage with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • include

      protected com.google.common.base.Optional<IncludeMirror> include()

      Returns a lazily initialized value of the include attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      include in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the include attribute
    • builderInclude

      protected com.google.common.base.Optional<FIncludeMirror> builderInclude()

      Returns a lazily initialized value of the builderInclude attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      builderInclude in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the builderInclude attribute
    • typeAdapters

      public com.google.common.base.Optional<TypeAdaptersMirror> typeAdapters()

      Returns a lazily initialized value of the typeAdapters attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      typeAdapters in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the typeAdapters attribute
    • okTypeAdapters

      public com.google.common.base.Optional<OkTypeAdaptersMirror> okTypeAdapters()

      Returns a lazily initialized value of the okTypeAdapters attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      okTypeAdapters in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the okTypeAdapters attribute
    • includedTypes

      List<TypeElement> includedTypes()

      Returns a lazily initialized value of the includedTypes attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      includedTypes in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the includedTypes attribute
    • builderIncludedTypes

      List<TypeElement> builderIncludedTypes()

      Returns a lazily initialized value of the builderIncludedTypes attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      builderIncludedTypes in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the builderIncludedTypes attribute
    • metaAnnotated

      List<Proto.MetaAnnotated> metaAnnotated()

      Returns a lazily initialized value of the metaAnnotated attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      metaAnnotated in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the metaAnnotated attribute
    • jacksonSerializeMode

      public Proto.JacksonMode jacksonSerializeMode()

      Returns a lazily initialized value of the jacksonSerializeMode attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      jacksonSerializeMode in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the jacksonSerializeMode attribute
    • isJacksonDeserializedAnnotated

      public boolean isJacksonDeserializedAnnotated()

      Returns a lazily initialized value of the isJacksonDeserializedAnnotated attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      isJacksonDeserializedAnnotated in class Proto.AbstractDeclaring
      Returns:
      A lazily initialized value of the isJacksonDeserializedAnnotated attribute
    • namedParentPackage

      com.google.common.base.Optional<Proto.DeclaringPackage> namedParentPackage()

      Returns a lazily initialized value of the namedParentPackage attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      namedParentPackage in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the namedParentPackage attribute
    • isJacksonSerialized

      public boolean isJacksonSerialized()

      Returns a lazily initialized value of the isJacksonSerialized attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      isJacksonSerialized in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the isJacksonSerialized attribute
    • isJacksonDeserialized

      public boolean isJacksonDeserialized()

      Returns a lazily initialized value of the isJacksonDeserialized attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      isJacksonDeserialized in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the isJacksonDeserialized attribute
    • isJacksonJsonTypeInfo

      public boolean isJacksonJsonTypeInfo()

      Returns a lazily initialized value of the isJacksonJsonTypeInfo attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      isJacksonJsonTypeInfo in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the isJacksonJsonTypeInfo attribute
    • isSerialStructural

      public boolean isSerialStructural()

      Returns a lazily initialized value of the isSerialStructural attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      isSerialStructural in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the isSerialStructural attribute
    • serialVersion

      public com.google.common.base.Optional<Long> serialVersion()

      Returns a lazily initialized value of the serialVersion attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      serialVersion in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the serialVersion attribute
    • style

      public com.google.common.base.Optional<StyleInfo> style()

      Returns a lazily initialized value of the style attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      style in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the style attribute
    • depluralize

      public com.google.common.base.Optional<String[]> depluralize()

      Returns a lazily initialized value of the depluralize attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      depluralize in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the depluralize attribute
    • datatypeEnabled

      public com.google.common.base.Optional<DataMirror> datatypeEnabled()

      Returns a lazily initialized value of the datatypeEnabled attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Overrides:
      datatypeEnabled in class Proto.DeclaringPackage
      Returns:
      A lazily initialized value of the datatypeEnabled attribute
    • copyOf

      Creates an immutable copy of a Proto.DeclaringPackage 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 DeclaringPackage instance
    • builder

      public static ImmutableProto.DeclaringPackage.Builder builder()
      Creates a builder for DeclaringPackage.
       ImmutableProto.DeclaringPackage.builder()
          .environment(org.immutables.value.processor.meta.Proto.Environment) // required environment
          .interner(org.immutables.value.processor.meta.Proto.Interning) // required interner
          .element(javax.lang.model.element.PackageElement) // required element
          .build();
       
      Returns:
      A new DeclaringPackage builder