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 ClassesModifier and TypeClassDescriptionfinal classprivate static classprivate static enumstatic enumprivate static enumstatic final classstatic class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) com.google.common.collect.ImmutableListMultimap<String, TypeElement> private com.google.common.collect.ImmutableList<ValueAttribute> private FromSupertypesModelprivate SourceStructureGetprivate CaseStructureprivate List<CharSequence> private Set<ValueAttribute> private List<ValueAttribute> intintprivate static final com.google.common.base.Splitterprivate com.google.common.collect.ImmutableList<String> (package private) ValueTypeprivate Booleanprivate GsonTypeTokensprivate booleanprivate TypeHierarchyCollectorprivate List<ValueAttribute> booleanbooleanbooleanbooleanbooleanprivate ValueAttributeprivate booleanprivate RepositoryModelprivate static final Stringprivate List<ValueAttribute> private CharSequenceprivate SuppressedWarningsprivate TelescopicBuildprivate ThrowForInvalidImmutableStateprivate Stringcom.google.common.collect.ImmutableList<String> private TypeExtractorprivate Set<ValueAttribute> private Set<ValueAttribute> com.google.common.collect.ImmutableList<ValueType.ValidationMethod> Fields inherited from class org.immutables.value.processor.meta.TypeIntrospectionBase
BOXED_TO_PRIMITIVE_TYPES, extendedClassesNames, implementedInterfacesNames, unresolvedYetArguments -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadditionalImports(Set<String> imports) void(package private) voidaddNormalizeMethod(String name, boolean normalize) private booleanprivate CharSequenceappendAccessModifier(ExecutableElement m, StringBuilder signature) private CharSequenceappendParameters(ExecutableElement m, StringBuilder signature, Proto.DeclaringType declaringType, boolean withTypes, boolean allFinal) private CharSequenceappendReturnType(ExecutableElement m, StringBuilder signature, Proto.DeclaringType declaringType, TypeMirror returnType) private com.google.common.collect.FluentIterable<ValueAttribute> private Collection<String> protected TypeHierarchyCollectorcollectTypeHierarchy(TypeMirror typeMirror) (package private) TypeHierarchyCollectorcreateTypeHierarchyCollector(Reporter reporter, Element element) boolean(package private) void(package private) void(package private) com.google.common.collect.ImmutableList<TypeElement> com.google.common.collect.ImmutableList<String> extractDocComment(Element element) private Longbooleangenerics()getCases()(package private) List<AnnotationInjections.AnnotationInjection> (package private) List<AnnotationInjections.AnnotationInjection> (package private) List<AnnotationInjections.AnnotationInjection> com.google.common.collect.ImmutableList<String> private SuppressedWarningsprivate TypeExtractorShould be called when it is known that there type adapters generation provided.booleanbooleanbooleanbooleanbooleanbooleanbooleaninthashCode()Used for type snapshottingprivate booleanbooleanbooleanbooleanbooleanbooleanprivate boolean(package private) com.google.common.collect.ImmutableSet<TypeElement> includedElements(TreesIncludeMirror include) (package private) Proto.DeclaringTypeinferDeclaringType(Element element) protected TypeMirrorbooleanbooleanbooleanMeans object hashcode is cached at some point.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanCheck if criteria repository should be generated.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanCheck if mongo repository should be generated (for annotation@Mongo.Repository).booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleankind()name()names()private ImportsTypeStringResolverprivate booleanprivate booleanprivate booleanprivate StringprintType(Element element, TypeMirror type, Proto.DeclaringType declaringType) report()boolean(package private) booleanstyle()booleanprivate StringtoSignature(ExecutableElement m, TypeMirror returnType) toString()typeWith()private booleanprivate booleanuseCollectionUtility(com.google.common.base.Predicate<ValueAttribute> predicate) private booleanprivate voidvalidateConstructorParameters(Set<ValueAttribute> parameters) 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 Details
-
SERIAL_VERSION_FIELD_NAME
- See Also:
-
element
-
attributes
-
isHashCodeDefined
public boolean isHashCodeDefined -
isEqualToDefined
public boolean isEqualToDefined -
isHashCodeFinal
public boolean isHashCodeFinal -
isEqualToFinal
public boolean isEqualToFinal -
isToStringDefined
public boolean isToStringDefined -
constitution
-
defaultAttributesCount
public int defaultAttributesCount -
derivedAttributesCount
public int derivedAttributesCount -
repositoryModel
-
sourceHeader
-
constructorAnnotations
-
caseStructure
-
nested
-
enclosingValue
-
validationMethods
-
immutableFeatures
-
constructorArguments
-
constructorExcluded
-
jacksonValueInitialized
private boolean jacksonValueInitialized -
jacksonValue
-
settableAttributes
-
uniqueAttributeBuilderListAttributes
-
uniqueNestedBuilderAttributes
-
implementedAttributes
-
allMarshalingAttributes
-
hierarchiCollector
-
telescopicBuild
-
throwForInvalidImmutableState
-
throwForNullPointer
-
additionalImports
-
generateBuilderFrom
-
accessorMapping
com.google.common.collect.ImmutableListMultimap<String,TypeElement> accessorMapping -
buildFromTypes
-
serial
-
throwing
-
hasCreatorDefined
private boolean hasCreatorDefined -
suppressedWarnings
-
docComment
-
gsonTypeTokens
-
typeExtractor
-
cachedSourceGet
-
underrideToString
-
underrideHashCode
-
underrideEquals
-
DOC_COMMENT_LINE_SPLITTER
private static final com.google.common.base.Splitter DOC_COMMENT_LINE_SPLITTER
-
-
Constructor Details
-
ValueType
public ValueType()
-
-
Method Details
-
generics
-
gsonTypeAdapters
Should be called when it is known that there type adapters generation provided.- Returns:
- the type adapters annotation
-
sourceHeader
-
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
-
factoryOf
-
factoryCopyOf
-
factoryInstance
-
factoryBuilder
-
kind
-
typeBuilder
-
typeBuilderImpl
-
typeAbstract
-
typeValue
-
typeDocument
-
typeImmutable
-
typeModifiable
-
typeEnclosing
-
typeWith
-
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
-
getConstructorAnnotations
-
getBuilderAnnotations
-
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
-
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
-
getCriteriaRepository
-
isAnnotationType
public boolean isAnnotationType() -
getCases
-
getCasesContextual
-
allKnownValuesInContext
-
includedElements
-
passedAnnotations
-
newTypeStringResolver
-
allValues
-
addNested
-
addNormalizeMethod
-
isImplementing
public boolean isImplementing() -
$$package
-
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
public boolean isUseLazyhash() -
isUsePrehashed
public boolean isUsePrehashed() -
simpleSerializableWithoutCopy
boolean simpleSerializableWithoutCopy() -
getInnerBuilder
-
getInnerModifiable
-
getDocumentName
-
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
-
getWithSettableAfterConstruction
-
getConstructorExcluded
-
getConstructableAttributes
-
getJacksonValue
-
validateConstructorParameters
-
computeConstructorArguments
-
getConstructorOmited
-
getSettableAttributes
-
getUniqueAttributeBuilderListAttributes
-
getUniqueAttributeBuilderAttributes
-
getExcludableAttributes
-
getMandatoryAttributes
-
getMandatoryOrEncodingAttributes
-
getLazyAttributes
-
getAllAccessibleAttributes
-
attributes
-
getMarshaledAttributes
-
getUnmarshaledAttributes
-
allMarshalingAttributes
-
getDefaultAttributes
-
getRequiresTrackedIsSetNonMandatoryAttributes
-
isUseStrictBuilder
public boolean isUseStrictBuilder() -
isUseStrictModifiable
public boolean isUseStrictModifiable() -
isUseJavaValidationApi
public boolean isUseJavaValidationApi() -
getTelescopicBuild
-
isGenerateNoargConstructor
public boolean isGenerateNoargConstructor() -
getThrowForInvalidImmutableState
-
getThrowForNullPointer
-
getImplementedAttributes
-
getEquivalenceAttributes
-
hasAuxiliaryAttributes
public boolean hasAuxiliaryAttributes() -
hasSingleParameterConstructor
public boolean hasSingleParameterConstructor() -
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
-
additionalImports
-
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
- Overrides:
collectTypeHierarchyin classTypeIntrospectionBase
-
createTypeHierarchyCollector
-
extendedClasses
com.google.common.collect.ImmutableList<TypeElement> extendedClasses() -
implementedInterfaces
com.google.common.collect.ImmutableSet<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
-
detectSerialization
void detectSerialization() -
detectParcelableCreator
void detectParcelableCreator() -
isGenerateParcelable
public boolean isGenerateParcelable() -
getImmutableCopyOfRoutines
-
generatedSuppressWarnings
-
getSuppressedWarnings
-
suppressesUncheckedWarning
public boolean suppressesUncheckedWarning() -
isGenerateSuppressAllWarnings
public boolean isGenerateSuppressAllWarnings() -
isUseCompactBuilder
public boolean isUseCompactBuilder() -
isDeprecated
public boolean isDeprecated() -
extractDocComment
-
getDocComment
-
inferDeclaringType
-
getNonAttributeAbstractMethodSignatures
-
getFunctionalData
-
getBuilderParameters
-
toSignature
-
appendAccessModifier
-
appendReturnType
private CharSequence appendReturnType(ExecutableElement m, StringBuilder signature, Proto.DeclaringType declaringType, TypeMirror returnType) -
appendParameters
private CharSequence appendParameters(ExecutableElement m, StringBuilder signature, Proto.DeclaringType declaringType, boolean withTypes, boolean allFinal) -
printType
-
getGsonTypeTokens
-
getGsonOther
-
getTypeExtractor
-
readCachedSourceGet
- Specified by:
readCachedSourceGetin interfaceTypeStringProvider.SourceExtractionCache
-
report
-
getDebugLines
-
isDataInline
public boolean isDataInline() -
style
- Specified by:
stylein interfaceHasStyleInfo
-
originalElement
-
getDeclaringPackageAnnotationInjections
List<AnnotationInjections.AnnotationInjection> getDeclaringPackageAnnotationInjections() -
syntheticFieldsInjectedAnnotations
-
constructorInjectedAnnotations
-
immutableTypeInjectedAnnotations
-
builderTypeInjectedAnnotations
-
modifiableTypeInjectedAnnotations
-
getDeclaringTypeAnnotationInjections
List<AnnotationInjections.AnnotationInjection> getDeclaringTypeAnnotationInjections() -
getDeclaringTypeEnclosingAnnotationInjections
List<AnnotationInjections.AnnotationInjection> getDeclaringTypeEnclosingAnnotationInjections() -
collectInjections
-
forceEqualsInWithers
public boolean forceEqualsInWithers() -
isGenerateIncludeHashCode
public boolean isGenerateIncludeHashCode() -
getIncludedHashCode
-
hashCode
public int hashCode()Used for type snapshotting -
toString
-