Class ImmutableProto.Protoclass
- Enclosing class:
ImmutableProto
Proto.Protoclass.
Use the builder to create immutable instances:
ImmutableProto.Protoclass.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeProtoclass.private final classNested classes/interfaces inherited from class org.immutables.value.processor.meta.Proto.Protoclass
Proto.Protoclass.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Constitutionprivate static final longprivate com.google.common.base.Optional<CriteriaMirror> private static final longprivate static final longprivate com.google.common.base.Optional<CriteriaRepositoryMirror> private static final longprivate static final longprivate com.google.common.base.Optional<DataMirror> private com.google.common.base.Optional<Proto.AbstractDeclaring> private final com.google.common.base.Optional<Proto.DeclaringType> private com.google.common.base.Optional<String[]> private static final longprivate final Elementprivate final com.google.common.base.Optional<Proto.DeclaringType> private static final longprivate Instantiatorprivate final Proto.Environmentprivate ValueImmutableInfoprivate static final longprivate static final longprivate com.google.common.base.Optional<TypeAdaptersMirror> private static final longprivate static final longprivate static final longprivate static final longprivate booleanprivate booleanprivate booleanprivate booleanprivate final Proto.Protoclass.Kindprivate longprivate final Stringprivate static final longprivate static final longprivate com.google.common.base.Optional<OkTypeAdaptersMirror> private com.google.common.base.Optional<Proto.AbstractDeclaring> private final Proto.DeclaringPackageprivate com.google.common.base.Optional<RepositoryMirror> private static final longprivate static final longprivate com.google.common.base.Optional<Long> private final Stringprivate final Elementprivate static final byteprivate static final byteprivate static final byteprivate Stylesprivate static final longprivate static final longprivate com.google.common.base.Optional<Proto.AbstractDeclaring> private final Visibility -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateProtoclass(Proto.Environment environment, Element sourceElement, Proto.DeclaringPackage packageOf, com.google.common.base.Optional<Proto.DeclaringType> declaringType, Proto.Protoclass.Kind kind) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forProtoclass.static ImmutableProto.ProtoclasscopyOf(Proto.Protoclass instance) Creates an immutable copy of aProto.Protoclassvalue.com.google.common.base.Optional<CriteriaMirror> criteria()com.google.common.base.Optional<CriteriaRepositoryMirror> com.google.common.base.Optional<DataMirror> com.google.common.base.Optional<Proto.AbstractDeclaring> com.google.common.base.Optional<Proto.DeclaringType> The class, which is annotated to be a@Value.Immutable,@Value.Includeor@Value.Enclosing.com.google.common.base.Optional<String[]> element()Element used mostly for error reporting, real model provided bysourceElement().com.google.common.base.Optional<Proto.DeclaringType> (package private) Proto.EnvironmentbooleanThis instance is equal to all instances ofProtoclassthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableProto.Protoclass another) features()com.google.common.base.Optional<TypeAdaptersMirror> inthashCode()Computes a hash code from attributes:name,packageOf,declaringType,kind,visibility.booleanbooleanbooleanbooleankind()Kind of protoclass declaration, it specifies how exactly the protoclass was declared.name()com.google.common.base.Optional<OkTypeAdaptersMirror> com.google.common.base.Optional<Proto.AbstractDeclaring> Declaring package that defines value type (usually by import).com.google.common.base.Optional<RepositoryMirror> com.google.common.base.Optional<Long> Source type elements stores type element which is used as a source of value type model.styles()toString()Prints the immutable valueProtoclasswith attribute values.com.google.common.base.Optional<Proto.AbstractDeclaring> withDeclaringType(com.google.common.base.Optional<? extends Proto.DeclaringType> optional) Copy the current immutable object by setting an optional value for thedeclaringTypeattribute.Copy the current immutable object by setting a present value for the optionaldeclaringTypeattribute.withEnvironment(Proto.Environment value) Copy the current immutable object by setting a value for theenvironmentattribute.withKind(Proto.Protoclass.Kind value) Copy the current immutable object by setting a value for thekindattribute.Copy the current immutable object by setting a value for thepackageOfattribute.withSourceElement(Element value) Copy the current immutable object by setting a value for thesourceElementattribute.Methods inherited from class org.immutables.value.processor.meta.Proto.Protoclass
createTypeNames, debug, declaringVisibility, getDebugLines, getTransform, getTreesInclude, getVisit, isAst, isJacksonProperties, isTransformer, isVisitorMethods inherited from class org.immutables.value.processor.meta.Proto.Diagnosable
processing, report
-
Field Details
-
environment
-
simpleName
-
name
-
sourceElement
-
packageOf
-
declaringType
-
kind
-
visibility
-
element
-
enclosingOf
-
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 -
CRITERIA_LAZY_INIT_BIT
private static final long CRITERIA_LAZY_INIT_BIT- See Also:
-
criteria
-
REPOSITORY_LAZY_INIT_BIT
private static final long REPOSITORY_LAZY_INIT_BIT- See Also:
-
repository
-
CRITERIA_REPOSITORY_LAZY_INIT_BIT
private static final long CRITERIA_REPOSITORY_LAZY_INIT_BIT- See Also:
-
criteriaRepository
-
GSON_TYPE_ADAPTERS_LAZY_INIT_BIT
private static final long GSON_TYPE_ADAPTERS_LAZY_INIT_BIT- See Also:
-
gsonTypeAdapters
-
TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT
private static final long TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT- See Also:
-
typeAdaptersProvider
-
OK_JSON_TYPE_ADAPTERS_LAZY_INIT_BIT
private static final long OK_JSON_TYPE_ADAPTERS_LAZY_INIT_BIT- See Also:
-
okJsonTypeAdapters
-
OK_TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT
private static final long OK_TYPE_ADAPTERS_PROVIDER_LAZY_INIT_BIT- See Also:
-
okTypeAdaptersProvider
-
DATATYPE_MARKER_LAZY_INIT_BIT
private static final long DATATYPE_MARKER_LAZY_INIT_BIT- See Also:
-
datatypeMarker
-
DATATYPE_PROVIDER_LAZY_INIT_BIT
private static final long DATATYPE_PROVIDER_LAZY_INIT_BIT- See Also:
-
datatypeProvider
-
SERIAL_VERSION_LAZY_INIT_BIT
private static final long SERIAL_VERSION_LAZY_INIT_BIT- See Also:
-
serialVersion
-
IS_SERIAL_STRUCTURAL_LAZY_INIT_BIT
private static final long IS_SERIAL_STRUCTURAL_LAZY_INIT_BIT- See Also:
-
isSerialStructural
private transient boolean isSerialStructural -
IS_JACKSON_SERIALIZED_LAZY_INIT_BIT
private static final long IS_JACKSON_SERIALIZED_LAZY_INIT_BIT- See Also:
-
isJacksonSerialized
private transient boolean isJacksonSerialized -
IS_JACKSON_DESERIALIZED_LAZY_INIT_BIT
private static final long IS_JACKSON_DESERIALIZED_LAZY_INIT_BIT- See Also:
-
isJacksonDeserialized
private transient boolean isJacksonDeserialized -
FEATURES_LAZY_INIT_BIT
private static final long FEATURES_LAZY_INIT_BIT- See Also:
-
features
-
STYLES_LAZY_INIT_BIT
private static final long STYLES_LAZY_INIT_BIT- See Also:
-
styles
-
DEPLURALIZE_LAZY_INIT_BIT
private static final long DEPLURALIZE_LAZY_INIT_BIT- See Also:
-
depluralize
-
IS_JACKSON_JSON_TYPE_INFO_LAZY_INIT_BIT
private static final long IS_JACKSON_JSON_TYPE_INFO_LAZY_INIT_BIT- See Also:
-
isJacksonJsonTypeInfo
private transient boolean isJacksonJsonTypeInfo -
CONSTITUTION_LAZY_INIT_BIT
private static final long CONSTITUTION_LAZY_INIT_BIT- See Also:
-
constitution
-
ENCODING_INSTANTIATOR_LAZY_INIT_BIT
private static final long ENCODING_INSTANTIATOR_LAZY_INIT_BIT- See Also:
-
encodingInstantiator
-
-
Constructor Details
-
Protoclass
private Protoclass(Proto.Environment environment, Element sourceElement, Proto.DeclaringPackage packageOf, com.google.common.base.Optional<Proto.DeclaringType> declaringType, Proto.Protoclass.Kind kind)
-
-
Method Details
-
environment
Proto.Environment environment()- Specified by:
environmentin classProto.Diagnosable- Returns:
- The value of the
environmentattribute
-
simpleName
- Overrides:
simpleNamein classProto.Diagnosable- Returns:
- The computed-at-construction value of the
simpleNameattribute
-
name
- Overrides:
namein classProto.Protoclass- Returns:
- The computed-at-construction value of the
nameattribute
-
sourceElement
Source type elements stores type element which is used as a source of value type model. It is the annotated class for@Value.Immutableor type referenced in@Value.Include.- Specified by:
sourceElementin classProto.Protoclass- Returns:
- source element
-
packageOf
Declaring package that defines value type (usually by import). Or the package in whichdeclaringType()resides.- Specified by:
packageOfin classProto.Protoclass- Returns:
- declaring package
-
declaringType
The class, which is annotated to be a@Value.Immutable,@Value.Includeor@Value.Enclosing.- Specified by:
declaringTypein classProto.Protoclass- Returns:
- declaring type
-
kind
Kind of protoclass declaration, it specifies how exactly the protoclass was declared.- Specified by:
kindin classProto.Protoclass- Returns:
- definition kind
-
visibility
- Overrides:
visibilityin classProto.Protoclass- Returns:
- The computed-at-construction value of the
visibilityattribute
-
element
Element used mostly for error reporting, real model provided bysourceElement().- Overrides:
elementin classProto.Protoclass
-
enclosingOf
- Overrides:
enclosingOfin classProto.Protoclass- Returns:
- The computed-at-construction value of the
enclosingOfattribute
-
withEnvironment
Copy the current immutable object by setting a value for theenvironmentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for environment- Returns:
- A modified copy of the
thisobject
-
withSourceElement
Copy the current immutable object by setting a value for thesourceElementattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sourceElement- Returns:
- A modified copy of the
thisobject
-
withPackageOf
Copy the current immutable object by setting a value for thepackageOfattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for packageOf- Returns:
- A modified copy of the
thisobject
-
withDeclaringType
Copy the current immutable object by setting a present value for the optionaldeclaringTypeattribute.- Parameters:
value- The value for declaringType- Returns:
- A modified copy of
thisobject
-
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 thedeclaringTypeattribute. A shallow reference equality check on the optional value is used to prevent copying of the same value by returningthis.- Parameters:
optional- A value for declaringType- Returns:
- A modified copy of
thisobject
-
withKind
Copy the current immutable object by setting a value for thekindattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for kind- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofProtoclassthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:name,packageOf,declaringType,kind,visibility. -
toString
Prints the immutable valueProtoclasswith attribute values. -
criteria
Returns a lazily initialized value of the
criteriaattribute. 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:
criteriain classProto.Protoclass- Returns:
- A lazily initialized value of the
criteriaattribute
-
repository
Returns a lazily initialized value of the
repositoryattribute. 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:
repositoryin classProto.Protoclass- Returns:
- A lazily initialized value of the
repositoryattribute
-
criteriaRepository
Returns a lazily initialized value of the
criteriaRepositoryattribute. 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:
criteriaRepositoryin classProto.Protoclass- Returns:
- A lazily initialized value of the
criteriaRepositoryattribute
-
gsonTypeAdapters
Returns a lazily initialized value of the
gsonTypeAdaptersattribute. 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:
gsonTypeAdaptersin classProto.Protoclass- Returns:
- A lazily initialized value of the
gsonTypeAdaptersattribute
-
typeAdaptersProvider
Returns a lazily initialized value of the
typeAdaptersProviderattribute. 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:
typeAdaptersProviderin classProto.Protoclass- Returns:
- A lazily initialized value of the
typeAdaptersProviderattribute
-
okJsonTypeAdapters
Returns a lazily initialized value of the
okJsonTypeAdaptersattribute. 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:
okJsonTypeAdaptersin classProto.Protoclass- Returns:
- A lazily initialized value of the
okJsonTypeAdaptersattribute
-
okTypeAdaptersProvider
Returns a lazily initialized value of the
okTypeAdaptersProviderattribute. 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:
okTypeAdaptersProviderin classProto.Protoclass- Returns:
- A lazily initialized value of the
okTypeAdaptersProviderattribute
-
datatypeMarker
Returns a lazily initialized value of the
datatypeMarkerattribute. 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:
datatypeMarkerin classProto.Protoclass- Returns:
- A lazily initialized value of the
datatypeMarkerattribute
-
datatypeProvider
Returns a lazily initialized value of the
datatypeProviderattribute. 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:
datatypeProviderin classProto.Protoclass- Returns:
- A lazily initialized value of the
datatypeProviderattribute
-
serialVersion
Returns a lazily initialized value of the
serialVersionattribute. 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:
serialVersionin classProto.Protoclass- Returns:
- A lazily initialized value of the
serialVersionattribute
-
isSerialStructural
public boolean isSerialStructural()Returns a lazily initialized value of the
isSerialStructuralattribute. 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:
isSerialStructuralin classProto.Protoclass- Returns:
- A lazily initialized value of the
isSerialStructuralattribute
-
isJacksonSerialized
public boolean isJacksonSerialized()Returns a lazily initialized value of the
isJacksonSerializedattribute. 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:
isJacksonSerializedin classProto.Protoclass- Returns:
- A lazily initialized value of the
isJacksonSerializedattribute
-
isJacksonDeserialized
public boolean isJacksonDeserialized()Returns a lazily initialized value of the
isJacksonDeserializedattribute. 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:
isJacksonDeserializedin classProto.Protoclass- Returns:
- A lazily initialized value of the
isJacksonDeserializedattribute
-
features
Returns a lazily initialized value of the
featuresattribute. 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:
featuresin classProto.Protoclass- Returns:
- A lazily initialized value of the
featuresattribute
-
styles
Returns a lazily initialized value of the
stylesattribute. 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:
stylesin classProto.Protoclass- Returns:
- A lazily initialized value of the
stylesattribute
-
depluralize
Returns a lazily initialized value of the
depluralizeattribute. 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:
depluralizein classProto.Protoclass- Returns:
- A lazily initialized value of the
depluralizeattribute
-
isJacksonJsonTypeInfo
public boolean isJacksonJsonTypeInfo()Returns a lazily initialized value of the
isJacksonJsonTypeInfoattribute. 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:
isJacksonJsonTypeInfoin classProto.Protoclass- Returns:
- A lazily initialized value of the
isJacksonJsonTypeInfoattribute
-
constitution
Returns a lazily initialized value of the
constitutionattribute. 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:
constitutionin classProto.Protoclass- Returns:
- A lazily initialized value of the
constitutionattribute
-
encodingInstantiator
Returns a lazily initialized value of the
encodingInstantiatorattribute. 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:
encodingInstantiatorin classProto.Protoclass- Returns:
- A lazily initialized value of the
encodingInstantiatorattribute
-
copyOf
Creates an immutable copy of aProto.Protoclassvalue. 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
Creates a builder forProtoclass.ImmutableProto.Protoclass.builder() .environment(org.immutables.value.processor.meta.Proto.Environment) // requiredenvironment.sourceElement(javax.lang.model.element.Element) // requiredsourceElement.packageOf(org.immutables.value.processor.meta.Proto.DeclaringPackage) // requiredpackageOf.declaringType(org.immutables.value.processor.meta.Proto.DeclaringType) // optionaldeclaringType.kind(org.immutables.value.processor.meta.Proto.Protoclass.Kind) // requiredkind.build();- Returns:
- A new Protoclass builder
-