Class ValueType
- java.lang.Object
-
- org.immutables.value.processor.meta.TypeIntrospectionBase
-
- org.immutables.value.processor.meta.ValueType
-
- All Implemented Interfaces:
HasStyleInfo,TypeStringProvider.SourceExtractionCache
public final class ValueType extends TypeIntrospectionBase implements HasStyleInfo, TypeStringProvider.SourceExtractionCache
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classValueType.FuncDataprivate static classValueType.HasJdkKindprivate static classValueType.NonAuxiliarystatic classValueType.Serializationprivate static classValueType.ToConstructorArgumentOrderstatic classValueType.UnderrideMethodstatic classValueType.ValidationMethod
-
Field Summary
-
Fields inherited from class org.immutables.value.processor.meta.TypeIntrospectionBase
BOXED_TO_PRIMITIVE_TYPES, extendedClassesNames, implementedInterfacesNames, unresolvedYetArguments
-
-
Constructor Summary
Constructors Constructor Description ValueType()
-
Method Summary
-
Methods inherited from class org.immutables.value.processor.meta.TypeIntrospectionBase
ensureTypeIntrospected, getDirectSupertype, getExtendedClassesNames, getImplementedInterfacesNames, introspectSupertypes, introspectType, introspectTypeMirror, isComparable, isEnumType, isOrdinalValue, isParcelable, isPrimitiveOrWrapped, isPrimitiveType, isPrimitiveWrappedType, isSerializable, unwrapType, wrapType
-
-
-
-
Field Detail
-
SERIAL_VERSION_FIELD_NAME
private static final java.lang.String SERIAL_VERSION_FIELD_NAME
- See Also:
- Constant Field Values
-
element
public javax.lang.model.element.Element element
-
attributes
public java.util.List<ValueAttribute> attributes
-
isHashCodeDefined
public boolean isHashCodeDefined
-
isEqualToDefined
public boolean isEqualToDefined
-
isHashCodeFinal
public boolean isHashCodeFinal
-
isEqualToFinal
public boolean isEqualToFinal
-
isToStringDefined
public boolean isToStringDefined
-
constitution
public Constitution constitution
-
defaultAttributesCount
public int defaultAttributesCount
-
derivedAttributesCount
public int derivedAttributesCount
-
repositoryModel
private RepositoryModel repositoryModel
-
sourceHeader
@Nullable private java.lang.CharSequence sourceHeader
-
constructorAnnotations
private java.util.List<java.lang.CharSequence> constructorAnnotations
-
caseStructure
private CaseStructure caseStructure
-
nested
public java.util.List<ValueType> nested
-
enclosingValue
@Nullable ValueType enclosingValue
-
validationMethods
public com.google.common.collect.ImmutableList<ValueType.ValidationMethod> validationMethods
-
immutableFeatures
public ValueImmutableInfo immutableFeatures
-
constructorArguments
@Nullable private java.util.Set<ValueAttribute> constructorArguments
-
constructorExcluded
@Nullable private java.util.List<ValueAttribute> constructorExcluded
-
jacksonValueInitialized
private boolean jacksonValueInitialized
-
jacksonValue
@Nullable private ValueAttribute jacksonValue
-
settableAttributes
@Nullable private java.util.List<ValueAttribute> settableAttributes
-
uniqueAttributeBuilderListAttributes
@Nullable private java.util.Set<ValueAttribute> uniqueAttributeBuilderListAttributes
-
uniqueNestedBuilderAttributes
@Nullable private java.util.Set<ValueAttribute> uniqueNestedBuilderAttributes
-
implementedAttributes
@Nullable private java.util.List<ValueAttribute> implementedAttributes
-
allMarshalingAttributes
@Nullable private com.google.common.collect.ImmutableList<ValueAttribute> allMarshalingAttributes
-
hierarchiCollector
private TypeHierarchyCollector hierarchiCollector
-
telescopicBuild
@Nullable private TelescopicBuild telescopicBuild
-
throwForInvalidImmutableState
@Nullable private ThrowForInvalidImmutableState throwForInvalidImmutableState
-
throwForNullPointer
@Nullable private java.lang.String throwForNullPointer
-
additionalImports
@Nullable private java.util.Set<java.lang.String> additionalImports
-
generateBuilderFrom
@Nullable private java.lang.Boolean generateBuilderFrom
-
accessorMapping
com.google.common.collect.ImmutableListMultimap<java.lang.String,javax.lang.model.element.TypeElement> accessorMapping
-
buildFromTypes
@Nullable private FromSupertypesModel buildFromTypes
-
serial
public ValueType.Serialization serial
-
throwing
public com.google.common.collect.ImmutableList<java.lang.String> throwing
-
hasCreatorDefined
private boolean hasCreatorDefined
-
suppressedWarnings
private SuppressedWarnings suppressedWarnings
-
docComment
private com.google.common.collect.ImmutableList<java.lang.String> docComment
-
gsonTypeTokens
@Nullable private GsonTypeTokens gsonTypeTokens
-
typeExtractor
@Nullable private TypeExtractor typeExtractor
-
cachedSourceGet
@Nullable private SourceStructureGet cachedSourceGet
-
underrideToString
@Nullable public ValueType.UnderrideMethod underrideToString
-
underrideHashCode
@Nullable public ValueType.UnderrideMethod underrideHashCode
-
underrideEquals
@Nullable public ValueType.UnderrideMethod underrideEquals
-
DOC_COMMENT_LINE_SPLITTER
private static final com.google.common.base.Splitter DOC_COMMENT_LINE_SPLITTER
-
-
Method Detail
-
generics
public Generics generics()
-
gsonTypeAdapters
public GsonMirrors.TypeAdapters gsonTypeAdapters()
Should be called when it is known that there type adapters generation provided.- Returns:
- the type adapters annotation
-
sourceHeader
public java.lang.CharSequence sourceHeader()
-
typeMoreObjects
@Nullable public java.lang.String typeMoreObjects()
-
hasDefaultAttributes
public boolean hasDefaultAttributes()
-
hasOptionalAttributes
public boolean hasOptionalAttributes()
-
hasOptionalConstructorArguments
public boolean hasOptionalConstructorArguments()
-
isUseOptionalAcceptNullableConstructor
public boolean isUseOptionalAcceptNullableConstructor()
-
hasEncodingAttributes
public boolean hasEncodingAttributes()
-
hasEncodingValueOrVirtualFields
public boolean hasEncodingValueOrVirtualFields()
-
isDeferCollectionAllocation
public boolean isDeferCollectionAllocation()
-
detectAttributeBuilders
public boolean detectAttributeBuilders()
-
hasDerivedAttributes
public boolean hasDerivedAttributes()
-
names
public Styles.UsingName.TypeNames names()
-
factoryOf
public Constitution.AppliedNameForms factoryOf()
-
factoryCopyOf
public Constitution.AppliedNameForms factoryCopyOf()
-
factoryInstance
public Constitution.AppliedNameForms factoryInstance()
-
factoryBuilder
public Constitution.AppliedNameForms factoryBuilder()
-
kind
public Proto.Protoclass.Kind kind()
-
typeBuilder
public Constitution.NameForms typeBuilder()
-
typeBuilderImpl
public Constitution.NameForms typeBuilderImpl()
-
typeAbstract
public Constitution.NameForms typeAbstract()
-
typeValue
public Constitution.NameForms typeValue()
-
typeDocument
public Constitution.NameForms typeDocument()
-
typeImmutable
public Constitution.NameForms typeImmutable()
-
typeModifiable
public Constitution.NameForms typeModifiable()
-
typeEnclosing
public Constitution.NameForms typeEnclosing()
-
typeWith
public Constitution.NameForms typeWith()
-
typePreferablyAbstract
public Constitution.NameForms typePreferablyAbstract()
-
isUseBuilder
public boolean isUseBuilder()
-
isImplementationHidden
public boolean isImplementationHidden()
-
isGenerateTransformer
public boolean isGenerateTransformer()
-
isGenerateVisitor
public boolean isGenerateVisitor()
-
isGenerateAst
public boolean isGenerateAst()
-
isGenerateJdkOnly
public boolean isGenerateJdkOnly()
-
isGenerateJdk9
public boolean isGenerateJdk9()
-
isGenerateBuildOrThrow
public boolean isGenerateBuildOrThrow()
-
isGenerateCanBuild
public boolean isGenerateCanBuild()
-
isGenerateWithUnaryOperator
public boolean isGenerateWithUnaryOperator()
-
isBeanFriendlyModifiable
public boolean isBeanFriendlyModifiable()
-
noGuavaInClasspath
private boolean noGuavaInClasspath()
-
isUseSimpleReadResolve
public boolean isUseSimpleReadResolve()
-
isOptionalAcceptNullable
public boolean isOptionalAcceptNullable()
-
serialVersionUID
@Nullable public java.lang.Long serialVersionUID()
-
getConstructorAnnotations
public java.util.List<java.lang.CharSequence> getConstructorAnnotations()
-
getBuilderAnnotations
public java.util.List<java.lang.CharSequence> getBuilderAnnotations()
-
findSerialVersionUID
private java.lang.Long findSerialVersionUID()
-
isUseValidation
public boolean isUseValidation()
-
isGenerateJacksonMapped
public boolean isGenerateJacksonMapped()
-
isGenerateJacksonProperties
public boolean isGenerateJacksonProperties()
-
isGenerateJacksonIngoreFields
public boolean isGenerateJacksonIngoreFields()
-
isJacksonDeserialized
public boolean isJacksonDeserialized()
-
isJacksonJsonTypeInfo
public boolean isJacksonJsonTypeInfo()
-
getTopSimple
public java.lang.String getTopSimple()
-
isTopLevel
public boolean isTopLevel()
-
isGenerateCriteria
public boolean isGenerateCriteria()
-
isGenerateCriteriaRepository
public boolean isGenerateCriteriaRepository()
Check if criteria repository should be generated. Usually means@Criteria.Repositoryannotation is present. This type of repository is different from (legacy) mongo repository identified by@Mongo.Repository(seeisGenerateRepository().
-
isGenerateRepository
public boolean isGenerateRepository()
Check if mongo repository should be generated (for annotation@Mongo.Repository). For criteria repository seeisGenerateCriteriaRepository()
-
getRepository
public MongoMirrors.Repository getRepository()
-
getCriteriaRepository
public RepositoryModel getCriteriaRepository()
-
isAnnotationType
public boolean isAnnotationType()
-
getCases
public CaseStructure getCases()
-
getCasesContextual
public CaseStructure getCasesContextual()
-
allKnownValuesInContext
private java.lang.Iterable<ValueType> allKnownValuesInContext()
-
includedElements
private java.util.List<javax.lang.model.element.Element> includedElements(TreesIncludeMirror include)
-
passedAnnotations
public java.util.List<java.lang.CharSequence> passedAnnotations()
-
newTypeStringResolver
private ImportsTypeStringResolver newTypeStringResolver()
-
allValues
public java.lang.Iterable<ValueType> allValues()
-
addNested
public void addNested(ValueType nested)
-
addNormalizeMethod
void addNormalizeMethod(java.lang.String name, boolean normalize)
-
isImplementing
public boolean isImplementing()
-
$$package
public java.lang.String $$package()
-
name
public java.lang.String name()
-
isGenerateOrdinalValue
public boolean isGenerateOrdinalValue()
-
isGenerateSafeDerived
public boolean isGenerateSafeDerived()
-
isUseConstructorOnly
public boolean isUseConstructorOnly()
-
isGenerateWithInterface
public boolean isGenerateWithInterface()
-
isUseCopyMethods
public boolean isUseCopyMethods()
-
isUseCopyConstructor
public boolean isUseCopyConstructor()
-
isUseSingleton
public boolean isUseSingleton()
-
isUseInterned
public boolean isUseInterned()
-
isCacheHash
public boolean isCacheHash()
Means object hashcode is cached at some point. Either lazily (on first access) or eagerly (during construction).- See Also:
isUseLazyhash(),isUsePrehashed()
-
isUseLazyhash
public boolean isUseLazyhash()
-
isUsePrehashed
public boolean isUsePrehashed()
-
simpleSerializableWithoutCopy
boolean simpleSerializableWithoutCopy()
-
getInnerBuilder
public Constitution.InnerBuilderDefinition getInnerBuilder()
-
getInnerModifiable
public Constitution.InnerModifiableDefinition getInnerModifiable()
-
getDocumentName
public java.lang.String getDocumentName()
-
getIdAttribute
@Nullable public ValueAttribute getIdAttribute()
-
isUseReferenceEquality
public boolean isUseReferenceEquality()
-
isUseStrongInterned
public boolean isUseStrongInterned()
-
isUseWeakInterned
public boolean isUseWeakInterned()
-
isUseEqualTo
public boolean isUseEqualTo()
-
isUseSingletonOnly
public boolean isUseSingletonOnly()
-
isUseSingletonOnlyForConstruction
public boolean isUseSingletonOnlyForConstruction()
-
useAttributelessSingleton
private boolean useAttributelessSingleton()
-
useSingletonNoOtherWay
private boolean useSingletonNoOtherWay()
-
isUseConstructor
public boolean isUseConstructor()
-
requiresAlternativeStrictConstructor
public boolean requiresAlternativeStrictConstructor()
-
getConstructorArguments
public java.util.Set<ValueAttribute> getConstructorArguments()
-
getWithSettableAfterConstruction
public java.util.List<ValueAttribute> getWithSettableAfterConstruction()
-
getConstructorExcluded
public java.util.List<ValueAttribute> getConstructorExcluded()
-
getConstructableAttributes
public java.util.List<ValueAttribute> getConstructableAttributes()
-
getJacksonValue
@Nullable public ValueAttribute getJacksonValue()
-
validateConstructorParameters
private void validateConstructorParameters(java.util.Set<ValueAttribute> parameters)
-
computeConstructorArguments
public java.util.Set<ValueAttribute> computeConstructorArguments()
-
getConstructorOmited
public java.util.List<ValueAttribute> getConstructorOmited()
-
getSettableAttributes
public java.util.List<ValueAttribute> getSettableAttributes()
-
getUniqueAttributeBuilderListAttributes
public java.util.Set<ValueAttribute> getUniqueAttributeBuilderListAttributes()
-
getUniqueAttributeBuilderAttributes
public java.util.Set<ValueAttribute> getUniqueAttributeBuilderAttributes()
-
getExcludableAttributes
public java.util.List<ValueAttribute> getExcludableAttributes()
-
getMandatoryAttributes
public java.util.List<ValueAttribute> getMandatoryAttributes()
-
getMandatoryOrEncodingAttributes
public java.util.List<ValueAttribute> getMandatoryOrEncodingAttributes()
-
getLazyAttributes
public java.util.List<ValueAttribute> getLazyAttributes()
-
getAllAccessibleAttributes
public java.util.List<ValueAttribute> getAllAccessibleAttributes()
-
attributes
private com.google.common.collect.FluentIterable<ValueAttribute> attributes()
-
getMarshaledAttributes
public java.util.List<ValueAttribute> getMarshaledAttributes()
-
getUnmarshaledAttributes
public java.util.List<ValueAttribute> getUnmarshaledAttributes()
-
allMarshalingAttributes
public java.util.List<ValueAttribute> allMarshalingAttributes()
-
getDefaultAttributes
public java.util.List<ValueAttribute> getDefaultAttributes()
-
getRequiresTrackedIsSetNonMandatoryAttributes
public java.util.List<ValueAttribute> getRequiresTrackedIsSetNonMandatoryAttributes()
-
isUseStrictBuilder
public boolean isUseStrictBuilder()
-
isUseStrictModifiable
public boolean isUseStrictModifiable()
-
isUseJavaValidationApi
public boolean isUseJavaValidationApi()
-
getTelescopicBuild
@Nullable public TelescopicBuild getTelescopicBuild()
-
isGenerateNoargConstructor
public boolean isGenerateNoargConstructor()
-
getThrowForInvalidImmutableState
public ThrowForInvalidImmutableState getThrowForInvalidImmutableState()
-
getThrowForNullPointer
public java.lang.String getThrowForNullPointer()
-
getImplementedAttributes
public java.util.List<ValueAttribute> getImplementedAttributes()
-
getEquivalenceAttributes
public java.util.List<ValueAttribute> getEquivalenceAttributes()
-
hasAuxiliaryAttributes
public boolean hasAuxiliaryAttributes()
-
hasSingleParameterConstructor
public boolean hasSingleParameterConstructor()
-
internalTypeMirror
protected javax.lang.model.type.TypeMirror internalTypeMirror()
- Specified by:
internalTypeMirrorin classTypeIntrospectionBase
-
isUseListUtility
public boolean isUseListUtility()
-
isUseSetUtility
public boolean isUseSetUtility()
-
isUseEnumSetUtility
public boolean isUseEnumSetUtility()
-
isUseSortedSetUtility
public boolean isUseSortedSetUtility()
-
isUseMapUtility
public boolean isUseMapUtility()
-
isUseEnumMapUtility
public boolean isUseEnumMapUtility()
-
isUseSortedMapUtility
public boolean isUseSortedMapUtility()
-
useCollectionUtility
private boolean useCollectionUtility(com.google.common.base.Predicate<ValueAttribute> predicate)
-
additionalImports
public void additionalImports(java.util.Set<java.lang.String> imports)
-
getRequiredSourceStarImports
public java.util.Set<java.lang.String> getRequiredSourceStarImports()
-
hasSomeUnresolvedTypes
private boolean hasSomeUnresolvedTypes()
-
hasCollectionAttribute
public boolean hasCollectionAttribute()
-
isUseNullSafeUtilities
public boolean isUseNullSafeUtilities()
-
isUseCollectionUtility
public boolean isUseCollectionUtility()
-
isGenerateConstructorUseCopyConstructor
public boolean isGenerateConstructorUseCopyConstructor()
-
hasNonNullCheckableParametersInDefaultOrder
private boolean hasNonNullCheckableParametersInDefaultOrder()
-
isSynthCopyConstructor
public boolean isSynthCopyConstructor()
-
isGenerateBuilderUseCopyConstructor
public boolean isGenerateBuilderUseCopyConstructor()
-
allAttributesSupportsThis
private boolean allAttributesSupportsThis()
-
isGenerateBuilderConstructor
public boolean isGenerateBuilderConstructor()
-
isGenerateClearBuilder
public boolean isGenerateClearBuilder()
-
collectTypeHierarchy
protected TypeHierarchyCollector collectTypeHierarchy(javax.lang.model.type.TypeMirror typeMirror)
- Overrides:
collectTypeHierarchyin classTypeIntrospectionBase
-
createTypeHierarchyCollector
TypeHierarchyCollector createTypeHierarchyCollector(Reporter reporter, javax.lang.model.element.Element element)
-
extendedClasses
com.google.common.collect.ImmutableList<javax.lang.model.element.TypeElement> extendedClasses()
-
implementedInterfaces
com.google.common.collect.ImmutableSet<javax.lang.model.element.TypeElement> implementedInterfaces()
-
isGenerateBuilderFrom
public boolean isGenerateBuilderFrom()
-
isGenerateToBuilder
public boolean isGenerateToBuilder()
-
isGenerateFilledFrom
public boolean isGenerateFilledFrom()
-
noAttributeInitializerIsNamedAsFrom
private boolean noAttributeInitializerIsNamedAsFrom()
-
noAttributeSetterIsNamedAsFrom
private boolean noAttributeSetterIsNamedAsFrom()
-
hasDeprecatedAttributes
public boolean hasDeprecatedAttributes()
-
hasSettableCollection
public boolean hasSettableCollection()
-
hasSettableMapping
public boolean hasSettableMapping()
-
getBuildFromTypes
public FromSupertypesModel getBuildFromTypes()
-
detectSerialization
void detectSerialization()
-
detectParcelableCreator
void detectParcelableCreator()
-
isGenerateParcelable
public boolean isGenerateParcelable()
-
getImmutableCopyOfRoutines
public java.util.Set<java.lang.String> getImmutableCopyOfRoutines()
-
generatedSuppressWarnings
public java.util.Set<java.lang.String> generatedSuppressWarnings()
-
getSuppressedWarnings
private SuppressedWarnings getSuppressedWarnings()
-
suppressesUncheckedWarning
public boolean suppressesUncheckedWarning()
-
isGenerateSuppressAllWarnings
public boolean isGenerateSuppressAllWarnings()
-
isUseCompactBuilder
public boolean isUseCompactBuilder()
-
isDeprecated
public boolean isDeprecated()
-
extractDocComment
public com.google.common.collect.ImmutableList<java.lang.String> extractDocComment(javax.lang.model.element.Element element)
-
getDocComment
public com.google.common.collect.ImmutableList<java.lang.String> getDocComment()
-
inferDeclaringType
Proto.DeclaringType inferDeclaringType(javax.lang.model.element.Element element)
-
getNonAttributeAbstractMethodSignatures
public java.util.Set<java.lang.String> getNonAttributeAbstractMethodSignatures()
-
getFunctionalData
public ValueType.FuncData getFunctionalData()
-
getBuilderParameters
public java.util.List<ValueAttribute> getBuilderParameters()
-
toSignature
private java.lang.String toSignature(javax.lang.model.element.ExecutableElement m, javax.lang.model.type.TypeMirror returnType)
-
appendAccessModifier
private java.lang.CharSequence appendAccessModifier(javax.lang.model.element.ExecutableElement m, java.lang.StringBuilder signature)
-
appendReturnType
private java.lang.CharSequence appendReturnType(javax.lang.model.element.ExecutableElement m, java.lang.StringBuilder signature, Proto.DeclaringType declaringType, javax.lang.model.type.TypeMirror returnType)
-
appendParameters
private java.lang.CharSequence appendParameters(javax.lang.model.element.ExecutableElement m, java.lang.StringBuilder signature, Proto.DeclaringType declaringType, boolean withTypes, boolean allFinal)
-
printType
private java.lang.String printType(javax.lang.model.element.Element element, javax.lang.model.type.TypeMirror type, Proto.DeclaringType declaringType)
-
getGsonTypeTokens
public GsonTypeTokens getGsonTypeTokens()
-
getGsonOther
@Nullable public ValueAttribute getGsonOther()
-
getTypeExtractor
private TypeExtractor getTypeExtractor()
-
readCachedSourceGet
@Nullable public SourceStructureGet readCachedSourceGet()
- Specified by:
readCachedSourceGetin interfaceTypeStringProvider.SourceExtractionCache
-
report
public Reporter report()
-
getDebugLines
public java.util.List<java.lang.String> getDebugLines()
-
isDataInline
public boolean isDataInline()
-
style
public StyleInfo style()
- Specified by:
stylein interfaceHasStyleInfo
-
originalElement
public javax.lang.model.element.Element originalElement()
-
getDeclaringPackageAnnotationInjections
java.util.List<AnnotationInjections.AnnotationInjection> getDeclaringPackageAnnotationInjections()
-
syntheticFieldsInjectedAnnotations
public java.util.Collection<java.lang.String> syntheticFieldsInjectedAnnotations()
-
constructorInjectedAnnotations
public java.util.Collection<java.lang.String> constructorInjectedAnnotations()
-
immutableTypeInjectedAnnotations
public java.util.Collection<java.lang.String> immutableTypeInjectedAnnotations()
-
builderTypeInjectedAnnotations
public java.util.Collection<java.lang.String> builderTypeInjectedAnnotations()
-
modifiableTypeInjectedAnnotations
public java.util.Collection<java.lang.String> modifiableTypeInjectedAnnotations()
-
getDeclaringTypeAnnotationInjections
java.util.List<AnnotationInjections.AnnotationInjection> getDeclaringTypeAnnotationInjections()
-
getDeclaringTypeEnclosingAnnotationInjections
java.util.List<AnnotationInjections.AnnotationInjection> getDeclaringTypeEnclosingAnnotationInjections()
-
collectInjections
private java.util.Collection<java.lang.String> collectInjections(AnnotationInjections.InjectAnnotation.Where target)
-
forceEqualsInWithers
public boolean forceEqualsInWithers()
-
isGenerateIncludeHashCode
public boolean isGenerateIncludeHashCode()
-
getIncludedHashCode
public java.lang.String getIncludedHashCode()
-
hashCode
public int hashCode()
Used for type snapshotting- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-