Class ImmutableProto.Protoclass

  • Enclosing class:
    ImmutableProto

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

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

    • Field Detail

      • simpleName

        private final transient java.lang.String simpleName
      • name

        private final transient java.lang.String name
      • sourceElement

        private final javax.lang.model.element.Element sourceElement
      • declaringType

        private final com.google.common.base.Optional<Proto.DeclaringType> declaringType
      • visibility

        private final transient Visibility visibility
      • element

        private final transient javax.lang.model.element.Element element
      • enclosingOf

        private final transient com.google.common.base.Optional<Proto.DeclaringType> enclosingOf
      • lazyInitBitmap

        private transient volatile long lazyInitBitmap
      • CRITERIA_LAZY_INIT_BIT

        private static final long CRITERIA_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • criteria

        private transient com.google.common.base.Optional<CriteriaMirror> criteria
      • REPOSITORY_LAZY_INIT_BIT

        private static final long REPOSITORY_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • repository

        private transient com.google.common.base.Optional<RepositoryMirror> repository
      • CRITERIA_REPOSITORY_LAZY_INIT_BIT

        private static final long CRITERIA_REPOSITORY_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • GSON_TYPE_ADAPTERS_LAZY_INIT_BIT

        private static final long GSON_TYPE_ADAPTERS_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • gsonTypeAdapters

        private transient com.google.common.base.Optional<TypeAdaptersMirror> gsonTypeAdapters
      • TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT

        private static final long TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • typeAdaptersProvider

        private transient com.google.common.base.Optional<Proto.AbstractDeclaring> typeAdaptersProvider
      • OK_JSON_TYPE_ADAPTERS_LAZY_INIT_BIT

        private static final long OK_JSON_TYPE_ADAPTERS_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • okJsonTypeAdapters

        private transient com.google.common.base.Optional<OkTypeAdaptersMirror> okJsonTypeAdapters
      • OK_TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT

        private static final long OK_TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • okTypeAdaptersProvider

        private transient com.google.common.base.Optional<Proto.AbstractDeclaring> okTypeAdaptersProvider
      • DATATYPE_MARKER_LAZY_INIT_BIT

        private static final long DATATYPE_MARKER_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • datatypeMarker

        private transient com.google.common.base.Optional<DataMirror> datatypeMarker
      • DATATYPE_PROVIDER_LAZY_INIT_BIT

        private static final long DATATYPE_PROVIDER_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • SERIAL_VERSION_LAZY_INIT_BIT

        private static final long SERIAL_VERSION_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • serialVersion

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

        private static final long IS_SERIAL_STRUCTURAL_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • isSerialStructural

        private transient boolean isSerialStructural
      • IS_JACKSON_SERIALIZED_LAZY_INIT_BIT

        private static final long IS_JACKSON_SERIALIZED_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • isJacksonSerialized

        private transient boolean isJacksonSerialized
      • IS_JACKSON_DESERIALIZED_LAZY_INIT_BIT

        private static final long IS_JACKSON_DESERIALIZED_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • isJacksonDeserialized

        private transient boolean isJacksonDeserialized
      • FEATURES_LAZY_INIT_BIT

        private static final long FEATURES_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • styles

        private transient Styles styles
      • DEPLURALIZE_LAZY_INIT_BIT

        private static final long DEPLURALIZE_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • depluralize

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

        private static final long IS_JACKSON_JSON_TYPE_INFO_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • isJacksonJsonTypeInfo

        private transient boolean isJacksonJsonTypeInfo
      • CONSTITUTION_LAZY_INIT_BIT

        private static final long CONSTITUTION_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • ENCODING_INSTANTIATOR_LAZY_INIT_BIT

        private static final long ENCODING_INSTANTIATOR_LAZY_INIT_BIT
        See Also:
        Constant Field Values
      • encodingInstantiator

        private transient Instantiator encodingInstantiator
    • Method Detail

      • simpleName

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

        public java.lang.String name()
        Overrides:
        name in class Proto.Protoclass
        Returns:
        The computed-at-construction value of the name attribute
      • sourceElement

        public javax.lang.model.element.Element sourceElement()
        Source type elements stores type element which is used as a source of value type model. It is the annotated class for @Value.Immutable or type referenced in @Value.Include.
        Specified by:
        sourceElement in class Proto.Protoclass
        Returns:
        source element
      • declaringType

        public com.google.common.base.Optional<Proto.DeclaringType> declaringType()
        The class, which is annotated to be a @Value.Immutable, @Value.Include or @Value.Enclosing.
        Specified by:
        declaringType in class Proto.Protoclass
        Returns:
        declaring type
      • withEnvironment

        public final ImmutableProto.Protoclass 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
      • withSourceElement

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

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

        public final ImmutableProto.Protoclass withDeclaringType​(Proto.DeclaringType value)
        Copy the current immutable object by setting a present value for the optional declaringType attribute.
        Parameters:
        value - The value for declaringType
        Returns:
        A modified copy of this object
      • withDeclaringType

        public final ImmutableProto.Protoclass withDeclaringType​(com.google.common.base.Optional<? extends Proto.DeclaringType> optional)
        Copy the current immutable object by setting an optional value for the declaringType attribute. A shallow reference equality check on the optional value is used to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for declaringType
        Returns:
        A modified copy of this object
      • withKind

        public final ImmutableProto.Protoclass withKind​(Proto.Protoclass.Kind value)
        Copy the current immutable object by setting a value for the kind attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for kind
        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 Protoclass 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()
        Computes a hash code from attributes: name, packageOf, declaringType, kind, visibility.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public com.google.common.base.Optional<CriteriaMirror> criteria()

        Returns a lazily initialized value of the criteria 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:
        criteria in class Proto.Protoclass
        Returns:
        A lazily initialized value of the criteria attribute
      • repository

        public com.google.common.base.Optional<RepositoryMirror> repository()

        Returns a lazily initialized value of the repository 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:
        repository in class Proto.Protoclass
        Returns:
        A lazily initialized value of the repository attribute
      • criteriaRepository

        public com.google.common.base.Optional<CriteriaRepositoryMirror> criteriaRepository()

        Returns a lazily initialized value of the criteriaRepository 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:
        criteriaRepository in class Proto.Protoclass
        Returns:
        A lazily initialized value of the criteriaRepository attribute
      • gsonTypeAdapters

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

        Returns a lazily initialized value of the gsonTypeAdapters 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:
        gsonTypeAdapters in class Proto.Protoclass
        Returns:
        A lazily initialized value of the gsonTypeAdapters attribute
      • typeAdaptersProvider

        public com.google.common.base.Optional<Proto.AbstractDeclaring> typeAdaptersProvider()

        Returns a lazily initialized value of the typeAdaptersProvider 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:
        typeAdaptersProvider in class Proto.Protoclass
        Returns:
        A lazily initialized value of the typeAdaptersProvider attribute
      • okJsonTypeAdapters

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

        Returns a lazily initialized value of the okJsonTypeAdapters 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:
        okJsonTypeAdapters in class Proto.Protoclass
        Returns:
        A lazily initialized value of the okJsonTypeAdapters attribute
      • okTypeAdaptersProvider

        public com.google.common.base.Optional<Proto.AbstractDeclaring> okTypeAdaptersProvider()

        Returns a lazily initialized value of the okTypeAdaptersProvider 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:
        okTypeAdaptersProvider in class Proto.Protoclass
        Returns:
        A lazily initialized value of the okTypeAdaptersProvider attribute
      • datatypeMarker

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

        Returns a lazily initialized value of the datatypeMarker 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:
        datatypeMarker in class Proto.Protoclass
        Returns:
        A lazily initialized value of the datatypeMarker attribute
      • datatypeProvider

        public com.google.common.base.Optional<Proto.AbstractDeclaring> datatypeProvider()

        Returns a lazily initialized value of the datatypeProvider 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:
        datatypeProvider in class Proto.Protoclass
        Returns:
        A lazily initialized value of the datatypeProvider attribute
      • serialVersion

        public com.google.common.base.Optional<java.lang.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.Protoclass
        Returns:
        A lazily initialized value of the serialVersion 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.Protoclass
        Returns:
        A lazily initialized value of the isSerialStructural 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.Protoclass
        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.Protoclass
        Returns:
        A lazily initialized value of the isJacksonDeserialized attribute
      • features

        public ValueImmutableInfo features()

        Returns a lazily initialized value of the features 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:
        features in class Proto.Protoclass
        Returns:
        A lazily initialized value of the features attribute
      • styles

        public Styles styles()

        Returns a lazily initialized value of the styles 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:
        styles in class Proto.Protoclass
        Returns:
        A lazily initialized value of the styles attribute
      • depluralize

        public com.google.common.base.Optional<java.lang.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.Protoclass
        Returns:
        A lazily initialized value of the depluralize 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.Protoclass
        Returns:
        A lazily initialized value of the isJacksonJsonTypeInfo attribute
      • constitution

        public Constitution constitution()

        Returns a lazily initialized value of the constitution 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:
        constitution in class Proto.Protoclass
        Returns:
        A lazily initialized value of the constitution attribute
      • encodingInstantiator

        public Instantiator encodingInstantiator()

        Returns a lazily initialized value of the encodingInstantiator 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:
        encodingInstantiator in class Proto.Protoclass
        Returns:
        A lazily initialized value of the encodingInstantiator attribute
      • copyOf

        public static ImmutableProto.Protoclass copyOf​(Proto.Protoclass instance)
        Creates an immutable copy of a Proto.Protoclass 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 Protoclass instance
      • builder

        public static ImmutableProto.Protoclass.Builder builder()
        Creates a builder for Protoclass.
         ImmutableProto.Protoclass.builder()
            .environment(org.immutables.value.processor.meta.Proto.Environment) // required environment
            .sourceElement(javax.lang.model.element.Element) // required sourceElement
            .packageOf(org.immutables.value.processor.meta.Proto.DeclaringPackage) // required packageOf
            .declaringType(org.immutables.value.processor.meta.Proto.DeclaringType) // optional declaringType
            .kind(org.immutables.value.processor.meta.Proto.Protoclass.Kind) // required kind
            .build();
         
        Returns:
        A new Protoclass builder