Class ValueAttribute
java.lang.Object
org.immutables.value.processor.meta.TypeIntrospectionBase
org.immutables.value.processor.meta.ValueAttribute
- All Implemented Interfaces:
HasStyleInfo
It's pointless to refactor this mess until
1) Some sort of type calculus toolkit used/created
2) Facets/Implicits in Generator toolkit with auto-memoising implemented
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumprivate static enum(package private) static enumstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]com.google.common.collect.ImmutableList<AnnotationInjections.AnnotationInjection> private TypeMirrorprivate AttributeBuilderDescriptorprivate static final intprivate static final intprivate TypeElement(package private) TypeElementprivate CriteriaModelprivate Stringbooleancom.google.common.collect.ImmutableList<String> (package private) Elementprivate static final String[]private booleanprivate static final Stringboolean(package private) booleanbooleanprivate static final Stringprivate ImportsTypeStringResolverbooleanbooleanbooleanbooleanbooleanbooleanbooleanprivate Booleanbooleanbooleanbooleanprivate List<CharSequence> private static final ValueAttribute.WholeTypeVariableprivate NullabilityAnnotationInfoprivate NullabilityAnnotationInfoprivate ValueAttribute.OrderKindprivate intprivate String(package private) TypeMirror(package private) Stringprivate Stringprivate AttributeTypeKindcom.google.common.collect.ImmutableList<String> private static final StringFields inherited from class org.immutables.value.processor.meta.TypeIntrospectionBase
BOXED_TO_PRIMITIVE_TYPES, extendedClassesNames, implementedInterfacesNames, unresolvedYetArguments -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprivate booleanbooleanbooleancharType()private voidprivate Collection<String> private com.google.common.collect.ImmutableSet<String> private intprivate voidconfigureOrdering(ValueAttribute.OrderKind orderKind, String annotationName) criteria()Expose criteria metadata like list of matchers for current attribute.private List<CharSequence> extractAnnotationsForElement(ElementType elementType, Set<String> additionalAnnotations) private StringextractRawType(String className) String[](package private) int(package private) Proto.DeclaringTypeMarshaled name for compatibility with repository.Suitable for JavaDocs, intemediate name mangling and for Guava intergration.Serialized name, actully specified via annotationgetType()private ValueAttribute.WholeTypeVariablegetWholeTypeVariable(boolean secondary) booleanboolean(package private) booleanprivate booleanbooleanChecks if type defined by this attribute has associated criteria (see@Criteria)private booleanbooleanprivate booleanbooleanbooleanbooleanbooleanbooleanprivate String(package private) voidinitAndValidate(Instantiator.InstantiationCreator instantiationCreator) Initialized Validates things that were not validated otherwiseprivate voidprivate voidprivate voidprivate voidprivate void(package private) voidinitNullabilitySupertype(ExecutableElement accessor) private voidprivate voidprivate voidprivate voidprotected TypeMirrorprotected voidprivate NullabilityAnnotationInfoisAccessorNullableAccessor(Element element) private booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisByte()booleanisChar()booleanbooleanbooleanbooleanbooleanbooleanbooleanisDouble()booleanbooleanisFloat()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean(package private) booleanbooleanbooleanisInt()booleanbooleanbooleanbooleanbooleanbooleanbooleanisLong()booleanbooleanprivate booleanIs it marked asCriteria.Id?private booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprivate booleanisNullableAnnotation(Name simpleName, Name qualifiedName) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprivate booleanbooleanbooleanprivate static booleanbooleanbooleanbooleanbooleanbooleanbooleanisShort()booleanbooleanbooleanbooleanbooleanbooleanbooleanprivate CharSequenceintprivate voidInit (or override) internal attributes specific to JavaBeansname()private Stringprivate Proto.Protoclass(package private) Reporterreport()private voidreportOrderingError(String annotationName, String msg) booleanbooleanbooleanstyle()private booleanboolean(package private) booleantoString()private com.google.common.collect.ImmutableList<String> tryFindSubtypes(TypeElement supertypeElement) typeKind()private voidprivate voidbooleanMethods inherited from class org.immutables.value.processor.meta.TypeIntrospectionBase
collectTypeHierarchy, ensureTypeIntrospected, getDirectSupertype, getExtendedClassesNames, getImplementedInterfacesNames, introspectSupertypes, introspectTypeMirror, isEnumType, isOrdinalValue, isParcelable, isPrimitiveOrWrapped, isPrimitiveType, isPrimitiveWrappedType, isSerializable, unwrapType, wrapType
-
Field Details
-
NON_WHOLE_TYPE_VARIABLE
-
CONSTRUCTOR_PARAMETER_DEFAULT_ORDER
private static final int CONSTRUCTOR_PARAMETER_DEFAULT_ORDER- See Also:
-
CONSTRUCTOR_NOT_A_PARAMETER
private static final int CONSTRUCTOR_NOT_A_PARAMETER- See Also:
-
GUAVA_IMMUTABLE_PREFIX
-
VALUE_ATTRIBUTE_NAME
- See Also:
-
ID_ATTRIBUTE_NAME
- See Also:
-
EMPTY_SERIALIZED_NAMES
-
names
-
isGenerateDefault
public boolean isGenerateDefault -
isGenerateDerived
public boolean isGenerateDerived -
isGenerateAbstract
public boolean isGenerateAbstract -
isGenerateLazy
public boolean isGenerateLazy -
isAttributeBuilder
public boolean isAttributeBuilder -
typeParameters
-
annotationInjections
public com.google.common.collect.ImmutableList<AnnotationInjections.AnnotationInjection> annotationInjections -
reporter
-
containingType
-
attributeValueType
-
returnType
TypeMirror returnType -
element
Element element -
returnTypeName
String returnTypeName -
attributeBuilderDescriptor
-
hasEnumFirstTypeParameter
public boolean hasEnumFirstTypeParameter -
containedTypeElement
-
containedSecondaryTypeElement
-
generateOrdinalValueSet
private boolean generateOrdinalValueSet -
arrayComponent
-
nullability
-
nullabilityInSupertype
-
rawTypeName
-
criteriaModel
-
docComment
-
deprecated
public boolean deprecated -
jsonQualifierAnnotations
-
serializedName
-
alternateSerializedNames
-
isGsonOther
-
orderKind
-
defaultInterface
-
expectedSubtypes
-
parameterOrder
private int parameterOrder -
typeKind
-
jacksonAnyGetter
public boolean jacksonAnyGetter -
jacksonValue
public boolean jacksonValue -
hasTypeVariables
public boolean hasTypeVariables -
importsResolver
-
instantiation
-
thrownCheckedExceptions
-
nullElements
-
isSuppressedOptional
public boolean isSuppressedOptional -
builderSwitcherModel
-
isBuilderParameter
public boolean isBuilderParameter -
hasSomeUnresolvedTypes
boolean hasSomeUnresolvedTypes -
isGenerateImmutableCopyOf
public boolean isGenerateImmutableCopyOf
-
-
Constructor Details
-
ValueAttribute
public ValueAttribute()
-
-
Method Details
-
name
-
criteria
Expose criteria metadata like list of matchers for current attribute. -
isBoolean
public boolean isBoolean() -
isInt
public boolean isInt() -
isShort
public boolean isShort() -
isChar
public boolean isChar() -
isByte
public boolean isByte() -
isLong
public boolean isLong() -
isStringType
public boolean isStringType() -
charType
public boolean charType() -
atNullability
-
atNullabilityOriginal
-
atNullabilityLocal
-
isSimpleLiteralType
public boolean isSimpleLiteralType() -
hasSimpleScalarElementType
public boolean hasSimpleScalarElementType() -
requiresAlternativeStrictConstructor
public boolean requiresAlternativeStrictConstructor() -
isSettable
public boolean isSettable() -
isGettable
public boolean isGettable() -
isIgnorable
public boolean isIgnorable() -
isOmittable
public boolean isOmittable() -
isMandatory
public boolean isMandatory() -
validation
-
hasCriteria
public boolean hasCriteria()Checks if type defined by this attribute has associated criteria (see@Criteria) -
isNullable
public boolean isNullable() -
isNullabilitySynthetic
public boolean isNullabilitySynthetic() -
isMaybeComparableKey
public boolean isMaybeComparableKey() -
isComparable
public boolean isComparable()- Overrides:
isComparablein classTypeIntrospectionBase
-
getJsonQualiferAnnotations
-
getAlternateSerializedNames
-
getSerializedName
Serialized name, actully specified via annotation- Returns:
- name for JSON as overriden.
-
getMarshaledName
Marshaled name for compatibility with repository.- Returns:
- get JSON name either specified or default.
-
isGsonOther
public boolean isGsonOther() -
isForcedEmpty
public boolean isForcedEmpty() -
internalTypeMirror
- Specified by:
internalTypeMirrorin classTypeIntrospectionBase
-
getType
-
getAnnotations
-
getFieldAnnotations
-
getConstructorParameterAnnotations
-
getJacksonFieldsAnnotations
-
jacksonPropertyAnnotation
-
getBuilderAttributeAnnotation
-
extractAnnotationsForElement
private List<CharSequence> extractAnnotationsForElement(ElementType elementType, Set<String> additionalAnnotations) -
isJsonIgnore
public boolean isJsonIgnore() -
isDataIgnore
public boolean isDataIgnore() -
typeParameters
-
isMapType
public boolean isMapType() -
isMultimapType
public boolean isMultimapType() -
isListType
public boolean isListType() -
isSetType
public boolean isSetType() -
hasNaturalOrder
public boolean hasNaturalOrder() -
hasReverseOrder
public boolean hasReverseOrder() -
isSortedSetType
public boolean isSortedSetType() -
isSortedMapType
public boolean isSortedMapType() -
isGenerateSortedSet
public boolean isGenerateSortedSet() -
isGenerateSortedMap
public boolean isGenerateSortedMap() -
isGenerateSortedMultiset
public boolean isGenerateSortedMultiset() -
checkOrderAnnotations
private void checkOrderAnnotations() -
configureOrdering
-
reportOrderingError
-
isJdkOptional
public boolean isJdkOptional() -
isFugueOptional
public boolean isFugueOptional() -
isGuavaOptional
public boolean isGuavaOptional() -
isJavaslangOptional
public boolean isJavaslangOptional() -
isJdkSpecializedOptional
public boolean isJdkSpecializedOptional() -
isOptionalType
public boolean isOptionalType() -
isCollectionType
public boolean isCollectionType() -
isGenerateEnumSet
public boolean isGenerateEnumSet() -
isGuavaImmutableDeclared
public boolean isGuavaImmutableDeclared() -
defaultInterface
-
inferDefaultInterface
-
isInterfaceDefaultMethod
public boolean isInterfaceDefaultMethod() -
isGenerateTransientDerived
public boolean isGenerateTransientDerived() -
isGenerateEnumMap
public boolean isGenerateEnumMap() -
hasVirtualImpl
public boolean hasVirtualImpl() -
getUnwrappedElementType
-
getUnwrappedValueElementType
-
getWrappedElementType
-
hasContainedElementType
private boolean hasContainedElementType() -
getRawType
-
getConsumedElementType
-
hasEnumFirstTypeParameter
public boolean hasEnumFirstTypeParameter() -
extractRawType
-
isUnwrappedElementPrimitiveType
public boolean isUnwrappedElementPrimitiveType() -
isUnwrappedSecondaryElementPrimitiveType
public boolean isUnwrappedSecondaryElementPrimitiveType() -
firstTypeParameter
-
secondTypeParameter
-
getElementType
-
getExpectedSubtypes
-
tryFindSubtypes
private com.google.common.collect.ImmutableList<String> tryFindSubtypes(TypeElement supertypeElement) -
isGenerateJdkOnly
public boolean isGenerateJdkOnly() -
isGenerateJdk9
public boolean isGenerateJdk9() -
isGenerateOrdinalValueSet
public boolean isGenerateOrdinalValueSet() -
isArrayType
public boolean isArrayType() -
isReferenceArrayType
public boolean isReferenceArrayType() -
isPrimitiveArrayType
public boolean isPrimitiveArrayType() -
isOptionalAcceptNullable
public boolean isOptionalAcceptNullable() -
introspectType
protected void introspectType()- Overrides:
introspectTypein classTypeIntrospectionBase
-
optionalSpecializedType
-
typeKind
-
isPrimitiveWrapperType
public boolean isPrimitiveWrapperType() -
isRegularMarshalableType
-
isRequiresMarshalingAdapter
public boolean isRequiresMarshalingAdapter() -
isRequiresMarshalingSecondaryAdapter
public boolean isRequiresMarshalingSecondaryAdapter() -
wrapArrayToIterable
public boolean wrapArrayToIterable() -
getRawCollectionType
Suitable for JavaDocs, intemediate name mangling and for Guava intergration.- Returns:
- the raw collection type
-
isMultisetType
public boolean isMultisetType() -
isCustomCollectionType
public boolean isCustomCollectionType() -
getRawMapType
-
getSecondaryElementType
-
getUnwrappedSecondaryElementType
-
getWrappedFirstElementType
-
getWrappedSecondaryElementType
-
getUnwrapperOrRawSecondaryElementType
-
getUnwrapperOrRawElementType
-
isNumberType
public boolean isNumberType() -
isFloatType
public boolean isFloatType() -
isFloat
public boolean isFloat() -
isDouble
public boolean isDouble() -
hasTypeAnnotations
public boolean hasTypeAnnotations() -
isNonRawElementType
public boolean isNonRawElementType() -
isNonRawSecondaryElementType
public boolean isNonRawSecondaryElementType() -
isContainerType
public boolean isContainerType() -
getWrapperType
-
isPrimitive
public boolean isPrimitive() -
isAttributeBuilder
public boolean isAttributeBuilder() -
getConstructorParameterOrder
int getConstructorParameterOrder() -
computeConstructorParameterOrder
private int computeConstructorParameterOrder() -
isAnnotationValueAttribute
private boolean isAnnotationValueAttribute() -
thereAreNoOtherMandatoryAttributes
boolean thereAreNoOtherMandatoryAttributes() -
toSignature
-
getAccess
-
getIntializerAccess
-
isPrimitiveElement
public boolean isPrimitiveElement() -
isSafeUncheckedCovariantCast
public boolean isSafeUncheckedCovariantCast() -
isAuxiliary
public boolean isAuxiliary() -
isEncoding
public boolean isEncoding() -
isMarkedAsMongoId
private boolean isMarkedAsMongoId() -
isMarkedAsCriteriaId
private boolean isMarkedAsCriteriaId()Is it marked asCriteria.Id? -
isIdAttribute
boolean isIdAttribute() -
isRedacted
private boolean isRedacted() -
isRedactedCompletely
public boolean isRedactedCompletely() -
getRedactedMask
-
initAndValidate
Initialized Validates things that were not validated otherwise- Parameters:
instantiationCreator- can instantiate encodings
-
validateThrowsClause
private void validateThrowsClause() -
collectThrownCheckedExceptions
-
getThrownCheckedExceptions
-
initAttributeBuilder
private void initAttributeBuilder() -
initImmutableCopyOf
private void initImmutableCopyOf() -
initOrderKind
private void initOrderKind() -
initTypeName
private void initTypeName() -
initAttributeValueType
private void initAttributeValueType() -
canAccessImplementation
-
implementationModifiableType
-
implementationType
-
hasAttributeValue
public boolean hasAttributeValue() -
attributeValueKindIsCollectionOfModifiable
public boolean attributeValueKindIsCollectionOfModifiable() -
isAttributeValueKindCopy
public boolean isAttributeValueKindCopy() -
isAttributeValueKindModifyFrom
public boolean isAttributeValueKindModifyFrom() -
getConstructorParameters
-
initTypeKind
private void initTypeKind() -
supportBuiltinContainerTypes
private boolean supportBuiltinContainerTypes() -
getWholeTypeVariable
-
getSecondaryWholeTypeVariable
-
getWholeTypeVariable
-
hasEnumContainedElementType
private boolean hasEnumContainedElementType() -
getDeclaringType
Proto.DeclaringType getDeclaringType() -
validateTypeAndAnnotations
private void validateTypeAndAnnotations() -
hasNakedWildcardArguments
private boolean hasNakedWildcardArguments() -
isAccessorNullableAccessor
-
initSpecialAnnotations
private void initSpecialAnnotations() -
isNullableAnnotation
-
isNullableCollector
public boolean isNullableCollector() -
isDeferCollectionAllocation
public boolean isDeferCollectionAllocation() -
initMiscellaneous
private void initMiscellaneous() -
isValidationCustomized
public boolean isValidationCustomized() -
initBuilderParamsIfApplicable
private void initBuilderParamsIfApplicable() -
maybeInitJavaBean
private void maybeInitJavaBean()Init (or override) internal attributes specific to JavaBeans -
hasBuilderSwitcherDefault
public boolean hasBuilderSwitcherDefault() -
isBuilderSwitcher
public boolean isBuilderSwitcher() -
canUseNullAsUndefined
public boolean canUseNullAsUndefined() -
requiresTrackIsSet
public boolean requiresTrackIsSet() -
getEnumElements
-
hasConstructorParameterCustomOrder
boolean hasConstructorParameterCustomOrder() -
protoclass
-
getGenericArgs
-
getAttributeBuilderDescriptor
-
report
Reporter report() -
getTypeTokenOfElement
-
getTypeTokenOfSecondaryElement
-
originalElement
-
originalTypeElement
-
style
- Specified by:
stylein interfaceHasStyleInfo
-
supportsInternalImplConstructor
public boolean supportsInternalImplConstructor() -
fieldInjectedAnnotations
-
accessorInjectedAnnotations
-
syntheticFieldsInjectedAnnotations
-
initializerInjectedAnnotations
-
constructorParameterInjectedAnnotations
-
elementInitializerInjectedAnnotations
-
collectInjections
-
toString
-
initNullabilitySupertype
-
isNullableInSupertype
public boolean isNullableInSupertype() -
atNullableInSupertypeLocal
-
limitLengthInToString
public int limitLengthInToString() -
shouldLimitLengthInToString
public boolean shouldLimitLengthInToString() -
isBeanFriendlyModifiable
public boolean isBeanFriendlyModifiable()
-