Class ImmutableConstitution


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    public final class ImmutableConstitution
    extends Constitution
    Immutable implementation of Constitution.

    Use the builder to create immutable instances: ImmutableConstitution.builder().

    • Constructor Detail

      • ImmutableConstitution

        private ImmutableConstitution​(Proto.Protoclass protoclass)
    • Method Detail

      • implementationPackage

        public java.lang.String implementationPackage()
        Overrides:
        implementationPackage in class Constitution
        Returns:
        The computed-at-construction value of the implementationPackage attribute
      • hasImmutableInBuilder

        public boolean hasImmutableInBuilder()
        Overrides:
        hasImmutableInBuilder in class Constitution
        Returns:
        The computed-at-construction value of the hasImmutableInBuilder attribute
      • withProtoclass

        public final ImmutableConstitution withProtoclass​(Proto.Protoclass value)
        Copy the current immutable object by setting a value for the protoclass attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for protoclass
        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 ImmutableConstitution 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: protoclass, implementationVisibility, builderVisibility, implementationPackage, names, hasImmutableInBuilder.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public Generics generics()

        Returns a lazily initialized value of the generics 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:
        generics in class Constitution
        Returns:
        A lazily initialized value of the generics attribute
      • typePreferablyAbstract

        public Constitution.NameForms typePreferablyAbstract()

        Returns a lazily initialized value of the typePreferablyAbstract 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:
        typePreferablyAbstract in class Constitution
        Returns:
        A lazily initialized value of the typePreferablyAbstract attribute
      • typeDocument

        public Constitution.NameForms typeDocument()

        Returns a lazily initialized value of the typeDocument 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:
        typeDocument in class Constitution
        Returns:
        A lazily initialized value of the typeDocument attribute
      • typeModifiable

        public Constitution.NameForms typeModifiable()

        Returns a lazily initialized value of the typeModifiable 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:
        typeModifiable in class Constitution
        Returns:
        A lazily initialized value of the typeModifiable attribute
      • factoryCreate

        public Constitution.AppliedNameForms factoryCreate()

        Returns a lazily initialized value of the factoryCreate 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:
        factoryCreate in class Constitution
        Returns:
        A lazily initialized value of the factoryCreate attribute
      • typeValue

        public Constitution.NameForms typeValue()
        Value is the canonical outside look of the value type. It should be either Constitution.typeAbstract() or Constitution.typeImmutable(). For factory it is a special surrogate.

        Returns a lazily initialized value of the typeValue 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:
        typeValue in class Constitution
        Returns:
        A lazily initialized value of the typeValue attribute
      • typeAbstract

        public Constitution.NameForms typeAbstract()
        Actual abstract value type that is definitive model for the value type.

        Returns a lazily initialized value of the typeAbstract 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:
        typeAbstract in class Constitution
        Returns:
        A lazily initialized value of the typeAbstract attribute
      • typeImmutable

        public Constitution.NameForms typeImmutable()
        Actual immutable value type generated implementation.

        Returns a lazily initialized value of the typeImmutable 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:
        typeImmutable in class Constitution
        Returns:
        A lazily initialized value of the typeImmutable attribute
      • typeImmutableEnclosingSimpleName

        java.lang.String typeImmutableEnclosingSimpleName()
        Walks to the enclosing type's simple names and applies naming convention. This shortcut/fix shows deficiency of model (it's probably more complicated than needed).

        Returns a lazily initialized value of the typeImmutableEnclosingSimpleName 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:
        typeImmutableEnclosingSimpleName in class Constitution
        Returns:
        A lazily initialized value of the typeImmutableEnclosingSimpleName attribute
      • factoryBuilder

        public Constitution.AppliedNameForms factoryBuilder()

        Returns a lazily initialized value of the factoryBuilder 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:
        factoryBuilder in class Constitution
        Returns:
        A lazily initialized value of the factoryBuilder attribute
      • factoryOf

        public Constitution.AppliedNameForms factoryOf()

        Returns a lazily initialized value of the factoryOf 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:
        factoryOf in class Constitution
        Returns:
        A lazily initialized value of the factoryOf attribute
      • factoryInstance

        public Constitution.AppliedNameForms factoryInstance()

        Returns a lazily initialized value of the factoryInstance 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:
        factoryInstance in class Constitution
        Returns:
        A lazily initialized value of the factoryInstance attribute
      • factoryCopyOf

        public Constitution.AppliedNameForms factoryCopyOf()

        Returns a lazily initialized value of the factoryCopyOf 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:
        factoryCopyOf in class Constitution
        Returns:
        A lazily initialized value of the factoryCopyOf attribute
      • typeEnclosingFactory

        public Constitution.NameForms typeEnclosingFactory()

        Returns a lazily initialized value of the typeEnclosingFactory 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:
        typeEnclosingFactory in class Constitution
        Returns:
        A lazily initialized value of the typeEnclosingFactory attribute
      • typeEnclosing

        public Constitution.NameForms typeEnclosing()

        Returns a lazily initialized value of the typeEnclosing 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:
        typeEnclosing in class Constitution
        Returns:
        A lazily initialized value of the typeEnclosing attribute
      • typeWith

        public Constitution.NameForms typeWith()

        Returns a lazily initialized value of the typeWith 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:
        typeWith in class Constitution
        Returns:
        A lazily initialized value of the typeWith attribute
      • typeBuilder

        public Constitution.NameForms typeBuilder()

        Returns a lazily initialized value of the typeBuilder 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:
        typeBuilder in class Constitution
        Returns:
        A lazily initialized value of the typeBuilder attribute
      • typeImplementationBuilder

        public Constitution.NameForms typeImplementationBuilder()

        Returns a lazily initialized value of the typeImplementationBuilder 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:
        typeImplementationBuilder in class Constitution
        Returns:
        A lazily initialized value of the typeImplementationBuilder attribute
      • innerBuilder

        public Constitution.InnerBuilderDefinition innerBuilder()

        Returns a lazily initialized value of the innerBuilder 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:
        innerBuilder in class Constitution
        Returns:
        A lazily initialized value of the innerBuilder attribute
      • innerModifiable

        public Constitution.InnerModifiableDefinition innerModifiable()

        Returns a lazily initialized value of the innerModifiable 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:
        innerModifiable in class Constitution
        Returns:
        A lazily initialized value of the innerModifiable attribute
      • copyOf

        public static ImmutableConstitution copyOf​(Constitution instance)
        Creates an immutable copy of a Constitution 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 Constitution instance