Class ValueType

All Implemented Interfaces:
HasStyleInfo, TypeStringProvider.SourceExtractionCache

public final class ValueType extends TypeIntrospectionBase implements HasStyleInfo, TypeStringProvider.SourceExtractionCache
  • Field Details

  • Constructor Details

    • ValueType

      public ValueType()
  • Method Details

    • 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 CharSequence sourceHeader()
    • typeMoreObjects

      @Nullable public 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

    • 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 Long serialVersionUID()
    • getConstructorAnnotations

      public List<CharSequence> getConstructorAnnotations()
    • getBuilderAnnotations

      public List<CharSequence> getBuilderAnnotations()
    • findSerialVersionUID

      private 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 String getTopSimple()
    • isTopLevel

      public boolean isTopLevel()
    • isGenerateCriteria

      public boolean isGenerateCriteria()
    • isGenerateCriteriaRepository

      public boolean isGenerateCriteriaRepository()
      Check if criteria repository should be generated. Usually means @Criteria.Repository annotation is present. This type of repository is different from (legacy) mongo repository identified by @Mongo.Repository (see isGenerateRepository().
    • isGenerateRepository

      public boolean isGenerateRepository()
      Check if mongo repository should be generated (for annotation @Mongo.Repository). For criteria repository see isGenerateCriteriaRepository()
    • getRepository

      public MongoMirrors.Repository getRepository()
    • getCriteriaRepository

      public RepositoryModel getCriteriaRepository()
    • isAnnotationType

      public boolean isAnnotationType()
    • getCases

      public CaseStructure getCases()
    • getCasesContextual

      public CaseStructure getCasesContextual()
    • allKnownValuesInContext

      private Iterable<ValueType> allKnownValuesInContext()
    • includedElements

      private List<Element> includedElements(TreesIncludeMirror include)
    • passedAnnotations

      public List<CharSequence> passedAnnotations()
    • newTypeStringResolver

      private ImportsTypeStringResolver newTypeStringResolver()
    • allValues

      public Iterable<ValueType> allValues()
    • addNested

      public void addNested(ValueType nested)
    • addNormalizeMethod

      void addNormalizeMethod(String name, boolean normalize)
    • isImplementing

      public boolean isImplementing()
    • $$package

      public String $$package()
    • name

      public 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

      public boolean isUseLazyhash()
    • isUsePrehashed

      public boolean isUsePrehashed()
    • simpleSerializableWithoutCopy

      boolean simpleSerializableWithoutCopy()
    • getInnerBuilder

      public Constitution.InnerBuilderDefinition getInnerBuilder()
    • getInnerModifiable

      public Constitution.InnerModifiableDefinition getInnerModifiable()
    • getDocumentName

      public 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 Set<ValueAttribute> getConstructorArguments()
    • getWithSettableAfterConstruction

      public List<ValueAttribute> getWithSettableAfterConstruction()
    • getConstructorExcluded

      public List<ValueAttribute> getConstructorExcluded()
    • getConstructableAttributes

      public List<ValueAttribute> getConstructableAttributes()
    • getJacksonValue

      @Nullable public ValueAttribute getJacksonValue()
    • validateConstructorParameters

      private void validateConstructorParameters(Set<ValueAttribute> parameters)
    • computeConstructorArguments

      public Set<ValueAttribute> computeConstructorArguments()
    • getConstructorOmited

      public List<ValueAttribute> getConstructorOmited()
    • getSettableAttributes

      public List<ValueAttribute> getSettableAttributes()
    • getUniqueAttributeBuilderListAttributes

      public Set<ValueAttribute> getUniqueAttributeBuilderListAttributes()
    • getUniqueAttributeBuilderAttributes

      public Set<ValueAttribute> getUniqueAttributeBuilderAttributes()
    • getExcludableAttributes

      public List<ValueAttribute> getExcludableAttributes()
    • getMandatoryAttributes

      public List<ValueAttribute> getMandatoryAttributes()
    • getMandatoryOrEncodingAttributes

      public List<ValueAttribute> getMandatoryOrEncodingAttributes()
    • getLazyAttributes

      public List<ValueAttribute> getLazyAttributes()
    • getAllAccessibleAttributes

      public List<ValueAttribute> getAllAccessibleAttributes()
    • attributes

      private com.google.common.collect.FluentIterable<ValueAttribute> attributes()
    • getMarshaledAttributes

      public List<ValueAttribute> getMarshaledAttributes()
    • getUnmarshaledAttributes

      public List<ValueAttribute> getUnmarshaledAttributes()
    • allMarshalingAttributes

      public List<ValueAttribute> allMarshalingAttributes()
    • getDefaultAttributes

      public List<ValueAttribute> getDefaultAttributes()
    • getRequiresTrackedIsSetNonMandatoryAttributes

      public 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 String getThrowForNullPointer()
    • getImplementedAttributes

      public List<ValueAttribute> getImplementedAttributes()
    • getEquivalenceAttributes

      public List<ValueAttribute> getEquivalenceAttributes()
    • hasAuxiliaryAttributes

      public boolean hasAuxiliaryAttributes()
    • hasSingleParameterConstructor

      public boolean hasSingleParameterConstructor()
    • internalTypeMirror

      protected TypeMirror internalTypeMirror()
      Specified by:
      internalTypeMirror in class TypeIntrospectionBase
    • 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(Set<String> imports)
    • getRequiredSourceStarImports

      public Set<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(TypeMirror typeMirror)
      Overrides:
      collectTypeHierarchy in class TypeIntrospectionBase
    • createTypeHierarchyCollector

      TypeHierarchyCollector createTypeHierarchyCollector(Reporter reporter, Element element)
    • 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

      public FromSupertypesModel getBuildFromTypes()
    • detectSerialization

      void detectSerialization()
    • detectParcelableCreator

      void detectParcelableCreator()
    • isGenerateParcelable

      public boolean isGenerateParcelable()
    • getImmutableCopyOfRoutines

      public Set<String> getImmutableCopyOfRoutines()
    • generatedSuppressWarnings

      public Set<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<String> extractDocComment(Element element)
    • getDocComment

      public com.google.common.collect.ImmutableList<String> getDocComment()
    • inferDeclaringType

      Proto.DeclaringType inferDeclaringType(Element element)
    • getNonAttributeAbstractMethodSignatures

      public Set<String> getNonAttributeAbstractMethodSignatures()
    • getFunctionalData

      public ValueType.FuncData getFunctionalData()
    • getBuilderParameters

      public List<ValueAttribute> getBuilderParameters()
    • toSignature

      private String toSignature(ExecutableElement m, TypeMirror returnType)
    • appendAccessModifier

      private CharSequence appendAccessModifier(ExecutableElement m, StringBuilder signature)
    • 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

      private String printType(Element element, 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:
      readCachedSourceGet in interface TypeStringProvider.SourceExtractionCache
    • report

      public Reporter report()
    • getDebugLines

      public List<String> getDebugLines()
    • isDataInline

      public boolean isDataInline()
    • style

      public StyleInfo style()
      Specified by:
      style in interface HasStyleInfo
    • originalElement

      public Element originalElement()
    • getDeclaringPackageAnnotationInjections

      List<AnnotationInjections.AnnotationInjection> getDeclaringPackageAnnotationInjections()
    • syntheticFieldsInjectedAnnotations

      public Collection<String> syntheticFieldsInjectedAnnotations()
    • constructorInjectedAnnotations

      public Collection<String> constructorInjectedAnnotations()
    • immutableTypeInjectedAnnotations

      public Collection<String> immutableTypeInjectedAnnotations()
    • builderTypeInjectedAnnotations

      public Collection<String> builderTypeInjectedAnnotations()
    • modifiableTypeInjectedAnnotations

      public Collection<String> modifiableTypeInjectedAnnotations()
    • getDeclaringTypeAnnotationInjections

      List<AnnotationInjections.AnnotationInjection> getDeclaringTypeAnnotationInjections()
    • getDeclaringTypeEnclosingAnnotationInjections

      List<AnnotationInjections.AnnotationInjection> getDeclaringTypeEnclosingAnnotationInjections()
    • collectInjections

      private Collection<String> collectInjections(AnnotationInjections.InjectAnnotation.Where target)
    • forceEqualsInWithers

      public boolean forceEqualsInWithers()
    • isGenerateIncludeHashCode

      public boolean isGenerateIncludeHashCode()
    • getIncludedHashCode

      public String getIncludedHashCode()
    • hashCode

      public int hashCode()
      Used for type snapshotting
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object