Class ImmutableAttributeBuilderReflection
- java.lang.Object
-
- org.immutables.value.processor.meta.AttributeBuilderReflection
-
- org.immutables.value.processor.meta.ImmutableAttributeBuilderReflection
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable final class ImmutableAttributeBuilderReflection extends AttributeBuilderReflectionImmutable implementation ofAttributeBuilderReflection.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
Fields Modifier and Type Field Description private static longATTRIBUTE_BUILDER_DESCRIPTOR_LAZY_INIT_BITprivate AttributeBuilderDescriptorattributeBuilderDescriptorprivate static longIS_ATTRIBUTE_BUILDER_LAZY_INIT_BITprivate booleanisAttributeBuilderprivate longlazyInitBitmapprivate static longREFLECTION_STRATEGY_LAZY_INIT_BITprivate AttributeBuilderReflection.StrategyreflectionStrategyprivate java.util.List<AttributeBuilderReflection.Strategy>strategiesprivate static longSTRATEGIES_LAZY_INIT_BITprivate ValueAttributevalueAttribute
-
Constructor Summary
Constructors Modifier Constructor Description privateImmutableAttributeBuilderReflection(ImmutableAttributeBuilderReflection original, ValueAttribute valueAttribute)privateImmutableAttributeBuilderReflection(ValueAttribute valueAttribute)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableAttributeBuilderReflectioncopyOf(AttributeBuilderReflection instance)Creates an immutable copy of aAttributeBuilderReflectionvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableAttributeBuilderReflectionthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableAttributeBuilderReflection another)(package private) AttributeBuilderDescriptorgetAttributeBuilderDescriptor()protected AttributeBuilderReflection.StrategygetReflectionStrategy()protected java.util.List<AttributeBuilderReflection.Strategy>getStrategies()inthashCode()Computes a hash code from attributes:valueAttribute.(package private) booleanisAttributeBuilder()static ImmutableAttributeBuilderReflectionof(ValueAttribute valueAttribute)Construct a new immutableAttributeBuilderReflectioninstance.java.lang.StringtoString()Prints the immutable valueAttributeBuilderReflectionwith attribute values.(package private) ValueAttributevalueAttribute()ImmutableAttributeBuilderReflectionwithValueAttribute(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 Detail
-
valueAttribute
private final ValueAttribute valueAttribute
-
lazyInitBitmap
private transient volatile long lazyInitBitmap
-
STRATEGIES_LAZY_INIT_BIT
private static final long STRATEGIES_LAZY_INIT_BIT
- See Also:
- Constant Field Values
-
strategies
private transient java.util.List<AttributeBuilderReflection.Strategy> strategies
-
IS_ATTRIBUTE_BUILDER_LAZY_INIT_BIT
private static final long IS_ATTRIBUTE_BUILDER_LAZY_INIT_BIT
- See Also:
- Constant Field Values
-
isAttributeBuilder
private transient boolean isAttributeBuilder
-
ATTRIBUTE_BUILDER_DESCRIPTOR_LAZY_INIT_BIT
private static final long ATTRIBUTE_BUILDER_DESCRIPTOR_LAZY_INIT_BIT
- See Also:
- Constant Field Values
-
attributeBuilderDescriptor
private transient AttributeBuilderDescriptor attributeBuilderDescriptor
-
REFLECTION_STRATEGY_LAZY_INIT_BIT
private static final long REFLECTION_STRATEGY_LAZY_INIT_BIT
- See Also:
- Constant Field Values
-
reflectionStrategy
private transient AttributeBuilderReflection.Strategy reflectionStrategy
-
-
Constructor Detail
-
ImmutableAttributeBuilderReflection
private ImmutableAttributeBuilderReflection(ValueAttribute valueAttribute)
-
ImmutableAttributeBuilderReflection
private ImmutableAttributeBuilderReflection(ImmutableAttributeBuilderReflection original, ValueAttribute valueAttribute)
-
-
Method Detail
-
valueAttribute
ValueAttribute valueAttribute()
- Specified by:
valueAttributein classAttributeBuilderReflection- Returns:
- The value of the
valueAttributeattribute
-
withValueAttribute
public final ImmutableAttributeBuilderReflection withValueAttribute(ValueAttribute value)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableAttributeBuilderReflectionthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableAttributeBuilderReflection another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:valueAttribute.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueAttributeBuilderReflectionwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
getStrategies
protected java.util.List<AttributeBuilderReflection.Strategy> 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
protected AttributeBuilderReflection.Strategy 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
public static ImmutableAttributeBuilderReflection of(ValueAttribute valueAttribute)
Construct a new immutableAttributeBuilderReflectioninstance.- Parameters:
valueAttribute- The value for thevalueAttributeattribute- Returns:
- An immutable AttributeBuilderReflection instance
-
copyOf
public static ImmutableAttributeBuilderReflection copyOf(AttributeBuilderReflection instance)
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
-
-