Class ImmutableEncodedElement
java.lang.Object
org.immutables.value.processor.encode.EncodedElement
org.immutables.value.processor.encode.ImmutableEncodedElement
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
final class ImmutableEncodedElement
extends EncodedElement
Immutable implementation of
EncodedElement.
Use the builder to create immutable instances:
new EncodedElement.Builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilds instances of typeEncodedElement.private final class(package private) static final classImmutable implementation ofEncodedElement.Param.(package private) static final classImmutable implementation ofEncodedElement.TypeParam.Nested classes/interfaces inherited from class org.immutables.value.processor.encode.EncodedElement
EncodedElement.Tag -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableList<String> private final Code.Bindingprivate final com.google.common.collect.ImmutableList<Code.Term> private final com.google.common.collect.ImmutableList<String> private final booleanprivate ImmutableEncodedElement.InitShimprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final Stringprivate final Namingprivate final com.google.common.collect.ImmutableList<Code.Term> private final com.google.common.collect.ImmutableList<EncodedElement.Param> private static final byteprivate static final byteprivate static final byteprivate final StandardNamingprivate final com.google.common.collect.ImmutableSet<EncodedElement.Tag> private final com.google.common.collect.ImmutableList<Type> private final Typeprivate final Type.Parametersprivate final com.google.common.collect.ImmutableList<EncodedElement.TypeParam> private final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableEncodedElement(String name, Type type, Naming naming, com.google.common.collect.ImmutableList<EncodedElement.Param> params, com.google.common.collect.ImmutableList<Code.Term> code, com.google.common.collect.ImmutableList<Type> thrown, com.google.common.collect.ImmutableSet<EncodedElement.Tag> tags, Type.Parameters typeParameters, com.google.common.collect.ImmutableList<EncodedElement.TypeParam> typeParams, com.google.common.collect.ImmutableList<String> doc, com.google.common.collect.ImmutableList<String> annotations, StandardNaming standardNaming) private -
Method Summary
Modifier and TypeMethodDescription(package private) com.google.common.collect.ImmutableList<String> (package private) Code.Binding(package private) com.google.common.collect.ImmutableList<Code.Term> code()static EncodedElementcopyOf(EncodedElement instance) Creates an immutable copy of aEncodedElementvalue.(package private) com.google.common.collect.ImmutableList<String> doc()booleanThis instance is equal to all instances ofImmutableEncodedElementthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableEncodedElement another) inthashCode()Computes a hash code from attributes:name,type,naming,params,code,thrown,tags,typeParameters,typeParams,doc,annotations,standardNaming,asBinding,isToString,isHashCode,isEquals,isFrom,isBuild,isInit,isWasInit,isCopy,isBuilderCopy,isExpose,inBuilder,isStatic,isFinal,isPrivate,isSynthetic,isImplField,isValueField,isStaticField,isField,isBuilderField,isStaticMethod,isValueMethod,isBuilderMethod,isBuilderStaticField,oneLiner,usesThis,isInlinable.(package private) boolean(package private) booleanisBuild()(package private) boolean(package private) boolean(package private) boolean(package private) boolean(package private) booleanisCopy()(package private) booleanisEquals()(package private) booleanisExpose()(package private) booleanisField()(package private) booleanisFinal()(package private) booleanisFrom()(package private) boolean(package private) boolean(package private) booleanisInit()(package private) boolean(package private) boolean(package private) booleanisStatic()(package private) boolean(package private) boolean(package private) boolean(package private) boolean(package private) boolean(package private) boolean(package private) boolean(package private) Stringname()(package private) Namingnaming()(package private) com.google.common.collect.ImmutableList<Code.Term> oneLiner()(package private) com.google.common.collect.ImmutableList<EncodedElement.Param> params()(package private) StandardNaming(package private) com.google.common.collect.ImmutableSet<EncodedElement.Tag> tags()(package private) com.google.common.collect.ImmutableList<Type> thrown()toString()Prints the immutable valueEncodedElementwith attribute values.(package private) Typetype()(package private) Type.Parameters(package private) com.google.common.collect.ImmutableList<EncodedElement.TypeParam> (package private) booleanusesThis()final ImmutableEncodedElementwithAnnotations(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofannotations.final ImmutableEncodedElementwithAnnotations(String... elements) Copy the current immutable object with elements that replace the content ofannotations.final ImmutableEncodedElementCopy the current immutable object with elements that replace the content ofcode.final ImmutableEncodedElementCopy the current immutable object with elements that replace the content ofcode.final ImmutableEncodedElementCopy the current immutable object with elements that replace the content ofdoc.final ImmutableEncodedElementCopy the current immutable object with elements that replace the content ofdoc.final ImmutableEncodedElementCopy the current immutable object by setting a value for thenameattribute.final ImmutableEncodedElementwithNaming(Naming value) Copy the current immutable object by setting a value for thenamingattribute.final ImmutableEncodedElementwithParams(Iterable<? extends EncodedElement.Param> elements) Copy the current immutable object with elements that replace the content ofparams.final ImmutableEncodedElementwithParams(EncodedElement.Param... elements) Copy the current immutable object with elements that replace the content ofparams.final ImmutableEncodedElementwithStandardNaming(StandardNaming value) Copy the current immutable object by setting a value for thestandardNamingattribute.final ImmutableEncodedElementwithTags(Iterable<EncodedElement.Tag> elements) Copy the current immutable object with elements that replace the content oftags.final ImmutableEncodedElementwithTags(EncodedElement.Tag... elements) Copy the current immutable object with elements that replace the content oftags.final ImmutableEncodedElementwithThrown(Iterable<? extends Type> elements) Copy the current immutable object with elements that replace the content ofthrown.final ImmutableEncodedElementwithThrown(Type... elements) Copy the current immutable object with elements that replace the content ofthrown.final ImmutableEncodedElementCopy the current immutable object by setting a value for thetypeattribute.final ImmutableEncodedElementCopy the current immutable object by setting a value for thetypeParametersattribute.final ImmutableEncodedElementwithTypeParams(Iterable<? extends EncodedElement.TypeParam> elements) Copy the current immutable object with elements that replace the content oftypeParams.final ImmutableEncodedElementwithTypeParams(EncodedElement.TypeParam... elements) Copy the current immutable object with elements that replace the content oftypeParams.Methods inherited from class org.immutables.value.processor.encode.EncodedElement
depluralize, firstParam, isVirtual, unitializedFieldValue
-
Field Details
-
name
-
type
-
naming
-
params
-
code
-
thrown
-
tags
-
typeParameters
-
typeParams
-
doc
-
annotations
-
standardNaming
-
asBinding
-
isToString
private final transient boolean isToString -
isHashCode
private final transient boolean isHashCode -
isEquals
private final transient boolean isEquals -
isFrom
private final transient boolean isFrom -
isBuild
private final transient boolean isBuild -
isInit
private final transient boolean isInit -
isWasInit
private final transient boolean isWasInit -
isCopy
private final transient boolean isCopy -
isBuilderCopy
private final transient boolean isBuilderCopy -
isExpose
private final transient boolean isExpose -
inBuilder
private final transient boolean inBuilder -
isStatic
private final transient boolean isStatic -
isFinal
private final transient boolean isFinal -
isPrivate
private final transient boolean isPrivate -
isSynthetic
private final transient boolean isSynthetic -
isImplField
private final transient boolean isImplField -
isValueField
private final transient boolean isValueField -
isStaticField
private final transient boolean isStaticField -
isField
private final transient boolean isField -
isBuilderField
private final transient boolean isBuilderField -
isStaticMethod
private final transient boolean isStaticMethod -
isValueMethod
private final transient boolean isValueMethod -
isBuilderMethod
private final transient boolean isBuilderMethod -
isBuilderStaticField
private final transient boolean isBuilderStaticField -
oneLiner
-
usesThis
private final transient boolean usesThis -
isInlinable
private final transient boolean isInlinable -
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
-
-
Constructor Details
-
ImmutableEncodedElement
-
ImmutableEncodedElement
private ImmutableEncodedElement(String name, Type type, Naming naming, com.google.common.collect.ImmutableList<EncodedElement.Param> params, com.google.common.collect.ImmutableList<Code.Term> code, com.google.common.collect.ImmutableList<Type> thrown, com.google.common.collect.ImmutableSet<EncodedElement.Tag> tags, Type.Parameters typeParameters, com.google.common.collect.ImmutableList<EncodedElement.TypeParam> typeParams, com.google.common.collect.ImmutableList<String> doc, com.google.common.collect.ImmutableList<String> annotations, StandardNaming standardNaming)
-
-
Method Details
-
name
String name()- Specified by:
namein classEncodedElement- Returns:
- The value of the
nameattribute
-
type
Type type()- Specified by:
typein classEncodedElement- Returns:
- The value of the
typeattribute
-
naming
Naming naming()- Specified by:
namingin classEncodedElement- Returns:
- The value of the
namingattribute
-
params
com.google.common.collect.ImmutableList<EncodedElement.Param> params()- Specified by:
paramsin classEncodedElement- Returns:
- The value of the
paramsattribute
-
code
com.google.common.collect.ImmutableList<Code.Term> code()- Specified by:
codein classEncodedElement- Returns:
- The value of the
codeattribute
-
thrown
com.google.common.collect.ImmutableList<Type> thrown()- Specified by:
thrownin classEncodedElement- Returns:
- The value of the
thrownattribute
-
tags
com.google.common.collect.ImmutableSet<EncodedElement.Tag> tags()- Specified by:
tagsin classEncodedElement- Returns:
- The value of the
tagsattribute
-
typeParameters
Type.Parameters typeParameters()- Specified by:
typeParametersin classEncodedElement- Returns:
- The value of the
typeParametersattribute
-
typeParams
com.google.common.collect.ImmutableList<EncodedElement.TypeParam> typeParams()- Specified by:
typeParamsin classEncodedElement- Returns:
- The value of the
typeParamsattribute
-
doc
com.google.common.collect.ImmutableList<String> doc()- Specified by:
docin classEncodedElement- Returns:
- The value of the
docattribute
-
annotations
com.google.common.collect.ImmutableList<String> annotations()- Specified by:
annotationsin classEncodedElement- Returns:
- The value of the
annotationsattribute
-
standardNaming
StandardNaming standardNaming()- Overrides:
standardNamingin classEncodedElement- Returns:
- The value of the
standardNamingattribute
-
asBinding
Code.Binding asBinding()- Overrides:
asBindingin classEncodedElement- Returns:
- The computed-at-construction value of the
asBindingattribute
-
isToString
boolean isToString()- Overrides:
isToStringin classEncodedElement- Returns:
- The computed-at-construction value of the
isToStringattribute
-
isHashCode
boolean isHashCode()- Overrides:
isHashCodein classEncodedElement- Returns:
- The computed-at-construction value of the
isHashCodeattribute
-
isEquals
boolean isEquals()- Overrides:
isEqualsin classEncodedElement- Returns:
- The computed-at-construction value of the
isEqualsattribute
-
isFrom
boolean isFrom()- Overrides:
isFromin classEncodedElement- Returns:
- The computed-at-construction value of the
isFromattribute
-
isBuild
boolean isBuild()- Overrides:
isBuildin classEncodedElement- Returns:
- The computed-at-construction value of the
isBuildattribute
-
isInit
boolean isInit()- Overrides:
isInitin classEncodedElement- Returns:
- The computed-at-construction value of the
isInitattribute
-
isWasInit
boolean isWasInit()- Overrides:
isWasInitin classEncodedElement- Returns:
- The computed-at-construction value of the
isWasInitattribute
-
isCopy
boolean isCopy()- Overrides:
isCopyin classEncodedElement- Returns:
- The computed-at-construction value of the
isCopyattribute
-
isBuilderCopy
boolean isBuilderCopy()- Overrides:
isBuilderCopyin classEncodedElement- Returns:
- The computed-at-construction value of the
isBuilderCopyattribute
-
isExpose
boolean isExpose()- Overrides:
isExposein classEncodedElement- Returns:
- The computed-at-construction value of the
isExposeattribute
-
inBuilder
boolean inBuilder()- Overrides:
inBuilderin classEncodedElement- Returns:
- The computed-at-construction value of the
inBuilderattribute
-
isStatic
boolean isStatic()- Overrides:
isStaticin classEncodedElement- Returns:
- The computed-at-construction value of the
isStaticattribute
-
isFinal
boolean isFinal()- Overrides:
isFinalin classEncodedElement- Returns:
- The computed-at-construction value of the
isFinalattribute
-
isPrivate
boolean isPrivate()- Overrides:
isPrivatein classEncodedElement- Returns:
- The computed-at-construction value of the
isPrivateattribute
-
isSynthetic
boolean isSynthetic()- Overrides:
isSyntheticin classEncodedElement- Returns:
- The computed-at-construction value of the
isSyntheticattribute
-
isImplField
boolean isImplField()- Overrides:
isImplFieldin classEncodedElement- Returns:
- The computed-at-construction value of the
isImplFieldattribute
-
isValueField
boolean isValueField()- Overrides:
isValueFieldin classEncodedElement- Returns:
- The computed-at-construction value of the
isValueFieldattribute
-
isStaticField
boolean isStaticField()- Overrides:
isStaticFieldin classEncodedElement- Returns:
- The computed-at-construction value of the
isStaticFieldattribute
-
isField
boolean isField()- Overrides:
isFieldin classEncodedElement- Returns:
- The computed-at-construction value of the
isFieldattribute
-
isBuilderField
boolean isBuilderField()- Overrides:
isBuilderFieldin classEncodedElement- Returns:
- The computed-at-construction value of the
isBuilderFieldattribute
-
isStaticMethod
boolean isStaticMethod()- Overrides:
isStaticMethodin classEncodedElement- Returns:
- The computed-at-construction value of the
isStaticMethodattribute
-
isValueMethod
boolean isValueMethod()- Overrides:
isValueMethodin classEncodedElement- Returns:
- The computed-at-construction value of the
isValueMethodattribute
-
isBuilderMethod
boolean isBuilderMethod()- Overrides:
isBuilderMethodin classEncodedElement- Returns:
- The computed-at-construction value of the
isBuilderMethodattribute
-
isBuilderStaticField
boolean isBuilderStaticField()- Overrides:
isBuilderStaticFieldin classEncodedElement- Returns:
- The computed-at-construction value of the
isBuilderStaticFieldattribute
-
oneLiner
com.google.common.collect.ImmutableList<Code.Term> oneLiner()- Overrides:
oneLinerin classEncodedElement- Returns:
- The computed-at-construction value of the
oneLinerattribute
-
usesThis
boolean usesThis()- Overrides:
usesThisin classEncodedElement- Returns:
- The computed-at-construction value of the
usesThisattribute
-
isInlinable
boolean isInlinable()- Overrides:
isInlinablein classEncodedElement- Returns:
- The computed-at-construction value of the
isInlinableattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withNaming
Copy the current immutable object by setting a value for thenamingattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for naming- Returns:
- A modified copy of the
thisobject
-
withParams
Copy the current immutable object with elements that replace the content ofparams.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withParams
Copy the current immutable object with elements that replace the content ofparams. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of params elements to set- Returns:
- A modified copy of
thisobject
-
withCode
Copy the current immutable object with elements that replace the content ofcode.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCode
Copy the current immutable object with elements that replace the content ofcode. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of code elements to set- Returns:
- A modified copy of
thisobject
-
withThrown
Copy the current immutable object with elements that replace the content ofthrown.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withThrown
Copy the current immutable object with elements that replace the content ofthrown. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of thrown elements to set- Returns:
- A modified copy of
thisobject
-
withTags
Copy the current immutable object with elements that replace the content oftags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTags
Copy the current immutable object with elements that replace the content oftags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of tags elements to set- Returns:
- A modified copy of
thisobject
-
withTypeParameters
Copy the current immutable object by setting a value for thetypeParametersattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for typeParameters- Returns:
- A modified copy of the
thisobject
-
withTypeParams
Copy the current immutable object with elements that replace the content oftypeParams.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTypeParams
public final ImmutableEncodedElement withTypeParams(Iterable<? extends EncodedElement.TypeParam> elements) Copy the current immutable object with elements that replace the content oftypeParams. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of typeParams elements to set- Returns:
- A modified copy of
thisobject
-
withDoc
Copy the current immutable object with elements that replace the content ofdoc.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDoc
Copy the current immutable object with elements that replace the content ofdoc. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of doc elements to set- Returns:
- A modified copy of
thisobject
-
withAnnotations
Copy the current immutable object with elements that replace the content ofannotations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAnnotations
Copy the current immutable object with elements that replace the content ofannotations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of annotations elements to set- Returns:
- A modified copy of
thisobject
-
withStandardNaming
Copy the current immutable object by setting a value for thestandardNamingattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for standardNaming- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableEncodedElementthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:name,type,naming,params,code,thrown,tags,typeParameters,typeParams,doc,annotations,standardNaming,asBinding,isToString,isHashCode,isEquals,isFrom,isBuild,isInit,isWasInit,isCopy,isBuilderCopy,isExpose,inBuilder,isStatic,isFinal,isPrivate,isSynthetic,isImplField,isValueField,isStaticField,isField,isBuilderField,isStaticMethod,isValueMethod,isBuilderMethod,isBuilderStaticField,oneLiner,usesThis,isInlinable. -
toString
Prints the immutable valueEncodedElementwith attribute values. -
copyOf
Creates an immutable copy of aEncodedElementvalue. 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 EncodedElement instance
-