Class ImmutableAttributeBuilderReflection
AttributeBuilderReflection.
Use the static factory method to create immutable instances:
ImmutableAttributeBuilderReflection.of().
-
Nested Class Summary
Nested classes/interfaces inherited from class org.immutables.value.processor.meta.AttributeBuilderReflection
AttributeBuilderReflection.FirstPartyStrategy, AttributeBuilderReflection.Strategy, AttributeBuilderReflection.ThirdPartyAttributeBuilderStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate AttributeBuilderDescriptorprivate static final longprivate booleanprivate longprivate static final longprivate List<AttributeBuilderReflection.Strategy> private static final longprivate final ValueAttribute -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableAttributeBuilderReflection(ImmutableAttributeBuilderReflection original, ValueAttribute valueAttribute) privateImmutableAttributeBuilderReflection(ValueAttribute valueAttribute) -
Method Summary
Modifier and TypeMethodDescriptioncopyOf(AttributeBuilderReflection instance) Creates an immutable copy of aAttributeBuilderReflectionvalue.booleanThis instance is equal to all instances ofImmutableAttributeBuilderReflectionthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableAttributeBuilderReflection another) (package private) AttributeBuilderDescriptorprotected AttributeBuilderReflection.Strategyprotected List<AttributeBuilderReflection.Strategy> inthashCode()Computes a hash code from attributes:valueAttribute.(package private) booleanof(ValueAttribute valueAttribute) Construct a new immutableAttributeBuilderReflectioninstance.toString()Prints the immutable valueAttributeBuilderReflectionwith attribute values.(package private) ValueAttributewithValueAttribute(ValueAttribute value) Copy the current immutable object by setting a value for thevalueAttributeattribute.Methods inherited from class org.immutables.value.processor.meta.AttributeBuilderReflection
forValueType
-
Field Details
-
valueAttribute
-
lazyInitBitmap
private transient volatile long lazyInitBitmap -
STRATEGIES_LAZY_INIT_BIT
private static final long STRATEGIES_LAZY_INIT_BIT- See Also:
-
strategies
-
IS_ATTRIBUTE_BUILDER_LAZY_INIT_BIT
private static final long IS_ATTRIBUTE_BUILDER_LAZY_INIT_BIT- See Also:
-
isAttributeBuilder
private transient boolean isAttributeBuilder -
ATTRIBUTE_BUILDER_DESCRIPTOR_LAZY_INIT_BIT
private static final long ATTRIBUTE_BUILDER_DESCRIPTOR_LAZY_INIT_BIT- See Also:
-
attributeBuilderDescriptor
-
REFLECTION_STRATEGY_LAZY_INIT_BIT
private static final long REFLECTION_STRATEGY_LAZY_INIT_BIT- See Also:
-
reflectionStrategy
-
-
Constructor Details
-
ImmutableAttributeBuilderReflection
-
ImmutableAttributeBuilderReflection
private ImmutableAttributeBuilderReflection(ImmutableAttributeBuilderReflection original, ValueAttribute valueAttribute)
-
-
Method Details
-
valueAttribute
ValueAttribute valueAttribute()- Specified by:
valueAttributein classAttributeBuilderReflection- Returns:
- The value of the
valueAttributeattribute
-
withValueAttribute
Copy the current immutable object by setting a value for thevalueAttributeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueAttribute- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableAttributeBuilderReflectionthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:valueAttribute. -
toString
Prints the immutable valueAttributeBuilderReflectionwith attribute values. -
getStrategies
Returns a lazily initialized value of the
strategiesattribute. 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:
getStrategiesin classAttributeBuilderReflection- Returns:
- A lazily initialized value of the
strategiesattribute
-
isAttributeBuilder
boolean isAttributeBuilder()Returns a lazily initialized value of the
isAttributeBuilderattribute. 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:
isAttributeBuilderin classAttributeBuilderReflection- Returns:
- A lazily initialized value of the
isAttributeBuilderattribute
-
getAttributeBuilderDescriptor
AttributeBuilderDescriptor getAttributeBuilderDescriptor()Returns a lazily initialized value of the
attributeBuilderDescriptorattribute. 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:
getAttributeBuilderDescriptorin classAttributeBuilderReflection- Returns:
- A lazily initialized value of the
attributeBuilderDescriptorattribute
-
getReflectionStrategy
Returns a lazily initialized value of the
reflectionStrategyattribute. 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:
getReflectionStrategyin classAttributeBuilderReflection- Returns:
- A lazily initialized value of the
reflectionStrategyattribute
-
of
Construct a new immutableAttributeBuilderReflectioninstance.- Parameters:
valueAttribute- The value for thevalueAttributeattribute- Returns:
- An immutable AttributeBuilderReflection instance
-
copyOf
Creates an immutable copy of aAttributeBuilderReflectionvalue. 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 AttributeBuilderReflection instance
-