Class ImmutableConstitution
Constitution.
Use the builder to create immutable instances:
ImmutableConstitution.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImmutable implementation ofConstitution.AppliedNameForms.static final classBuilds instances of typeImmutableConstitution.private final classstatic final classImmutable implementation ofConstitution.NameForms.Nested classes/interfaces inherited from class org.immutables.value.processor.meta.Constitution
Constitution.AbstractNameForms, Constitution.InnerBaseClassDefinition, Constitution.InnerBuilderDefinition, Constitution.InnerModifiableDefinition -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Visibilityprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate Constitution.AppliedNameFormsprivate Constitution.AppliedNameFormsprivate Constitution.AppliedNameFormsprivate Constitution.AppliedNameFormsprivate Constitution.AppliedNameFormsprivate Genericsprivate static final longprivate final booleanprivate final Stringprivate final Visibilityprivate ImmutableConstitution.InitShimprivate static final longprivate static final longprivate longprivate final Styles.UsingName.TypeNamesprivate final Proto.Protoclassprivate static final byteprivate static final byteprivate static final byteprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Stringprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Constitution.NameFormsprivate Constitution.NameForms -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableConstitution.static ImmutableConstitutioncopyOf(Constitution instance) Creates an immutable copy of aConstitutionvalue.booleanThis instance is equal to all instances ofImmutableConstitutionthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableConstitution another) generics()inthashCode()Computes a hash code from attributes:protoclass,implementationVisibility,builderVisibility,implementationPackage,names,hasImmutableInBuilder.booleannames()toString()Prints the immutable valueConstitutionwith attribute values.Actual abstract value type that is definitive model for the value type.Actual immutable value type generated implementation.(package private) StringWalks to the enclosing type's simple names and applies naming convention.Value is the canonical outside look of the value type.typeWith()final ImmutableConstitutionwithProtoclass(Proto.Protoclass value) Copy the current immutable object by setting a value for theprotoclassattribute.Methods inherited from class org.immutables.value.processor.meta.Constitution
definingPackage, hasEnclosingNonvalue, hasTopLevelBuilder, hasTopLevelImmutable, isFactory, isImplementationHidden, isImplementationPrimary, isNested, isNestedFactoryOrConstructor, isOutsideBuilder, isOutsideBuilderNotNested, isSimple, returnsAbstractValueType, style
-
Field Details
-
protoclass
-
implementationVisibility
-
builderVisibility
-
implementationPackage
-
names
-
hasImmutableInBuilder
private final transient boolean hasImmutableInBuilder -
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
-
lazyInitBitmap
private transient volatile long lazyInitBitmap -
GENERICS_LAZY_INIT_BIT
private static final long GENERICS_LAZY_INIT_BIT- See Also:
-
generics
-
TYPE_PREFERABLY_ABSTRACT_LAZY_INIT_BIT
private static final long TYPE_PREFERABLY_ABSTRACT_LAZY_INIT_BIT- See Also:
-
typePreferablyAbstract
-
TYPE_DOCUMENT_LAZY_INIT_BIT
private static final long TYPE_DOCUMENT_LAZY_INIT_BIT- See Also:
-
typeDocument
-
TYPE_MODIFIABLE_LAZY_INIT_BIT
private static final long TYPE_MODIFIABLE_LAZY_INIT_BIT- See Also:
-
typeModifiable
-
FACTORY_CREATE_LAZY_INIT_BIT
private static final long FACTORY_CREATE_LAZY_INIT_BIT- See Also:
-
factoryCreate
-
TYPE_VALUE_LAZY_INIT_BIT
private static final long TYPE_VALUE_LAZY_INIT_BIT- See Also:
-
typeValue
-
TYPE_ABSTRACT_LAZY_INIT_BIT
private static final long TYPE_ABSTRACT_LAZY_INIT_BIT- See Also:
-
typeAbstract
-
TYPE_IMMUTABLE_LAZY_INIT_BIT
private static final long TYPE_IMMUTABLE_LAZY_INIT_BIT- See Also:
-
typeImmutable
-
TYPE_IMMUTABLE_ENCLOSING_SIMPLE_NAME_LAZY_INIT_BIT
private static final long TYPE_IMMUTABLE_ENCLOSING_SIMPLE_NAME_LAZY_INIT_BIT- See Also:
-
typeImmutableEnclosingSimpleName
-
FACTORY_BUILDER_LAZY_INIT_BIT
private static final long FACTORY_BUILDER_LAZY_INIT_BIT- See Also:
-
factoryBuilder
-
FACTORY_OF_LAZY_INIT_BIT
private static final long FACTORY_OF_LAZY_INIT_BIT- See Also:
-
factoryOf
-
FACTORY_INSTANCE_LAZY_INIT_BIT
private static final long FACTORY_INSTANCE_LAZY_INIT_BIT- See Also:
-
factoryInstance
-
FACTORY_COPY_OF_LAZY_INIT_BIT
private static final long FACTORY_COPY_OF_LAZY_INIT_BIT- See Also:
-
factoryCopyOf
-
TYPE_ENCLOSING_FACTORY_LAZY_INIT_BIT
private static final long TYPE_ENCLOSING_FACTORY_LAZY_INIT_BIT- See Also:
-
typeEnclosingFactory
-
TYPE_ENCLOSING_LAZY_INIT_BIT
private static final long TYPE_ENCLOSING_LAZY_INIT_BIT- See Also:
-
typeEnclosing
-
TYPE_WITH_LAZY_INIT_BIT
private static final long TYPE_WITH_LAZY_INIT_BIT- See Also:
-
typeWith
-
TYPE_BUILDER_LAZY_INIT_BIT
private static final long TYPE_BUILDER_LAZY_INIT_BIT- See Also:
-
typeBuilder
-
TYPE_IMPLEMENTATION_BUILDER_LAZY_INIT_BIT
private static final long TYPE_IMPLEMENTATION_BUILDER_LAZY_INIT_BIT- See Also:
-
typeImplementationBuilder
-
INNER_BUILDER_LAZY_INIT_BIT
private static final long INNER_BUILDER_LAZY_INIT_BIT- See Also:
-
innerBuilder
-
INNER_MODIFIABLE_LAZY_INIT_BIT
private static final long INNER_MODIFIABLE_LAZY_INIT_BIT- See Also:
-
innerModifiable
-
-
Constructor Details
-
ImmutableConstitution
-
-
Method Details
-
protoclass
- Specified by:
protoclassin classConstitution- Returns:
- The value of the
protoclassattribute
-
implementationVisibility
- Overrides:
implementationVisibilityin classConstitution- Returns:
- The computed-at-construction value of the
implementationVisibilityattribute
-
builderVisibility
- Overrides:
builderVisibilityin classConstitution- Returns:
- The computed-at-construction value of the
builderVisibilityattribute
-
implementationPackage
- Overrides:
implementationPackagein classConstitution- Returns:
- The computed-at-construction value of the
implementationPackageattribute
-
names
- Overrides:
namesin classConstitution- Returns:
- The computed-at-construction value of the
namesattribute
-
hasImmutableInBuilder
public boolean hasImmutableInBuilder()- Overrides:
hasImmutableInBuilderin classConstitution- Returns:
- The computed-at-construction value of the
hasImmutableInBuilderattribute
-
withProtoclass
Copy the current immutable object by setting a value for theprotoclassattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for protoclass- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableConstitutionthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:protoclass,implementationVisibility,builderVisibility,implementationPackage,names,hasImmutableInBuilder. -
toString
Prints the immutable valueConstitutionwith attribute values. -
generics
Returns a lazily initialized value of the
genericsattribute. 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:
genericsin classConstitution- Returns:
- A lazily initialized value of the
genericsattribute
-
typePreferablyAbstract
Returns a lazily initialized value of the
typePreferablyAbstractattribute. 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:
typePreferablyAbstractin classConstitution- Returns:
- A lazily initialized value of the
typePreferablyAbstractattribute
-
typeDocument
Returns a lazily initialized value of the
typeDocumentattribute. 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:
typeDocumentin classConstitution- Returns:
- A lazily initialized value of the
typeDocumentattribute
-
typeModifiable
Returns a lazily initialized value of the
typeModifiableattribute. 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:
typeModifiablein classConstitution- Returns:
- A lazily initialized value of the
typeModifiableattribute
-
factoryCreate
Returns a lazily initialized value of the
factoryCreateattribute. 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:
factoryCreatein classConstitution- Returns:
- A lazily initialized value of the
factoryCreateattribute
-
typeValue
Value is the canonical outside look of the value type. It should be eitherConstitution.typeAbstract()orConstitution.typeImmutable(). For factory it is a special surrogate.Returns a lazily initialized value of the
typeValueattribute. 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:
typeValuein classConstitution- Returns:
- A lazily initialized value of the
typeValueattribute
-
typeAbstract
Actual abstract value type that is definitive model for the value type.Returns a lazily initialized value of the
typeAbstractattribute. 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:
typeAbstractin classConstitution- Returns:
- A lazily initialized value of the
typeAbstractattribute
-
typeImmutable
Actual immutable value type generated implementation.Returns a lazily initialized value of the
typeImmutableattribute. 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:
typeImmutablein classConstitution- Returns:
- A lazily initialized value of the
typeImmutableattribute
-
typeImmutableEnclosingSimpleName
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
typeImmutableEnclosingSimpleNameattribute. 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:
typeImmutableEnclosingSimpleNamein classConstitution- Returns:
- A lazily initialized value of the
typeImmutableEnclosingSimpleNameattribute
-
factoryBuilder
Returns a lazily initialized value of the
factoryBuilderattribute. 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:
factoryBuilderin classConstitution- Returns:
- A lazily initialized value of the
factoryBuilderattribute
-
factoryOf
Returns a lazily initialized value of the
factoryOfattribute. 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:
factoryOfin classConstitution- Returns:
- A lazily initialized value of the
factoryOfattribute
-
factoryInstance
Returns a lazily initialized value of the
factoryInstanceattribute. 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:
factoryInstancein classConstitution- Returns:
- A lazily initialized value of the
factoryInstanceattribute
-
factoryCopyOf
Returns a lazily initialized value of the
factoryCopyOfattribute. 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:
factoryCopyOfin classConstitution- Returns:
- A lazily initialized value of the
factoryCopyOfattribute
-
typeEnclosingFactory
Returns a lazily initialized value of the
typeEnclosingFactoryattribute. 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:
typeEnclosingFactoryin classConstitution- Returns:
- A lazily initialized value of the
typeEnclosingFactoryattribute
-
typeEnclosing
Returns a lazily initialized value of the
typeEnclosingattribute. 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:
typeEnclosingin classConstitution- Returns:
- A lazily initialized value of the
typeEnclosingattribute
-
typeWith
Returns a lazily initialized value of the
typeWithattribute. 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:
typeWithin classConstitution- Returns:
- A lazily initialized value of the
typeWithattribute
-
typeBuilder
Returns a lazily initialized value of the
typeBuilderattribute. 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:
typeBuilderin classConstitution- Returns:
- A lazily initialized value of the
typeBuilderattribute
-
typeImplementationBuilder
Returns a lazily initialized value of the
typeImplementationBuilderattribute. 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:
typeImplementationBuilderin classConstitution- Returns:
- A lazily initialized value of the
typeImplementationBuilderattribute
-
innerBuilder
Returns a lazily initialized value of the
innerBuilderattribute. 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:
innerBuilderin classConstitution- Returns:
- A lazily initialized value of the
innerBuilderattribute
-
innerModifiable
Returns a lazily initialized value of the
innerModifiableattribute. 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:
innerModifiablein classConstitution- Returns:
- A lazily initialized value of the
innerModifiableattribute
-
copyOf
Creates an immutable copy of aConstitutionvalue. 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
-
builder
Creates a builder forImmutableConstitution.ImmutableConstitution.builder() .protoclass(org.immutables.value.processor.meta.Proto.Protoclass) // requiredprotoclass.build();- Returns:
- A new ImmutableConstitution builder
-