Package com.dslplatform.json.processor
Class AttributeInfo
- java.lang.Object
-
- com.dslplatform.json.processor.AttributeInfo
-
public class AttributeInfo extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Stringaliasjava.util.List<java.lang.String>alternativeNamesjavax.lang.model.element.AnnotationMirrorannotationjavax.lang.model.element.VariableElementargumentbooleancontainsStructOwnerTypeConverterInfoconverterjavax.lang.model.element.Elementelementjavax.lang.model.element.VariableElementfieldbooleanfullMatchjava.lang.StringidJsonAttribute.IncludePolicyincludeToMinimalintindexbooleanisArraybooleanisGenericbooleanisJsonObjectbooleanisListbooleanisMapbooleanisSetbooleanmandatoryjava.lang.StringnamebooleannotNulljavax.lang.model.element.ExecutableElementreadMethodjava.lang.StringreadPropertyjavax.lang.model.type.TypeMirrortypejava.lang.StringtypeNameCompiledJson.TypeSignaturetypeSignaturejava.util.Map<java.lang.String,java.lang.Integer>typeVariablesIndexjava.util.LinkedHashSet<javax.lang.model.type.TypeMirror>usedTypesjavax.lang.model.element.ExecutableElementwriteMethod
-
Constructor Summary
Constructors Constructor Description AttributeInfo(java.lang.String name, javax.lang.model.element.ExecutableElement readMethod, javax.lang.model.element.ExecutableElement writeMethod, javax.lang.model.element.VariableElement field, javax.lang.model.element.VariableElement argument, javax.lang.model.type.TypeMirror type, boolean isList, boolean isSet, boolean isMap, javax.lang.model.element.AnnotationMirror annotation, boolean notNull, boolean mandatory, int index, java.lang.String alias, boolean fullMatch, CompiledJson.TypeSignature typeSignature, JsonAttribute.IncludePolicy includeToMinimal, ConverterInfo converter, boolean isJsonObject, java.util.LinkedHashSet<javax.lang.model.type.TypeMirror> usedTypes, java.lang.String typeName, java.util.Map<java.lang.String,java.lang.Integer> typeVariablesIndex, java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> genericSignatures, boolean containsStructOwnerType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeInfoasConcreteType(javax.lang.model.util.Types types, java.util.LinkedHashMap<java.lang.String,javax.lang.model.type.TypeMirror> genericSignatures)booleancanReadInput()private booleancanResolveCollection(java.lang.String content, TypeSupport typeSupport, java.util.Map<java.lang.String,StructInfo> structs)booleancanWriteOutput()java.util.List<java.lang.String>collectionContent(TypeSupport typeSupport, java.util.Map<java.lang.String,StructInfo> structs)(package private) java.lang.StringcreateTypeSignature(javax.lang.model.util.Types types, javax.lang.model.type.TypeMirror type, java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> genericSignatures)booleanisEnum(java.util.Map<java.lang.String,StructInfo> structs)
-
-
-
Field Detail
-
id
public final java.lang.String id
-
name
public final java.lang.String name
-
readMethod
@Nullable public final javax.lang.model.element.ExecutableElement readMethod
-
writeMethod
@Nullable public final javax.lang.model.element.ExecutableElement writeMethod
-
field
@Nullable public final javax.lang.model.element.VariableElement field
-
argument
@Nullable public final javax.lang.model.element.VariableElement argument
-
type
public final javax.lang.model.type.TypeMirror type
-
annotation
@Nullable public final javax.lang.model.element.AnnotationMirror annotation
-
element
public final javax.lang.model.element.Element element
-
notNull
public final boolean notNull
-
mandatory
public final boolean mandatory
-
index
public final int index
-
alias
public final java.lang.String alias
-
fullMatch
public final boolean fullMatch
-
typeSignature
public final CompiledJson.TypeSignature typeSignature
-
includeToMinimal
public final JsonAttribute.IncludePolicy includeToMinimal
-
converter
public final ConverterInfo converter
-
isJsonObject
public final boolean isJsonObject
-
alternativeNames
public final java.util.List<java.lang.String> alternativeNames
-
readProperty
public final java.lang.String readProperty
-
typeName
public final java.lang.String typeName
-
isArray
public final boolean isArray
-
isList
public final boolean isList
-
isSet
public final boolean isSet
-
isMap
public final boolean isMap
-
isGeneric
public final boolean isGeneric
-
usedTypes
public final java.util.LinkedHashSet<javax.lang.model.type.TypeMirror> usedTypes
-
typeVariablesIndex
public final java.util.Map<java.lang.String,java.lang.Integer> typeVariablesIndex
-
containsStructOwnerType
public final boolean containsStructOwnerType
-
-
Constructor Detail
-
AttributeInfo
public AttributeInfo(java.lang.String name, @Nullable javax.lang.model.element.ExecutableElement readMethod, @Nullable javax.lang.model.element.ExecutableElement writeMethod, @Nullable javax.lang.model.element.VariableElement field, @Nullable javax.lang.model.element.VariableElement argument, javax.lang.model.type.TypeMirror type, boolean isList, boolean isSet, boolean isMap, @Nullable javax.lang.model.element.AnnotationMirror annotation, boolean notNull, boolean mandatory, int index, @Nullable java.lang.String alias, boolean fullMatch, @Nullable CompiledJson.TypeSignature typeSignature, JsonAttribute.IncludePolicy includeToMinimal, @Nullable ConverterInfo converter, boolean isJsonObject, java.util.LinkedHashSet<javax.lang.model.type.TypeMirror> usedTypes, java.lang.String typeName, java.util.Map<java.lang.String,java.lang.Integer> typeVariablesIndex, java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> genericSignatures, boolean containsStructOwnerType)
-
-
Method Detail
-
asConcreteType
public AttributeInfo asConcreteType(javax.lang.model.util.Types types, java.util.LinkedHashMap<java.lang.String,javax.lang.model.type.TypeMirror> genericSignatures)
-
isEnum
public boolean isEnum(java.util.Map<java.lang.String,StructInfo> structs)
-
canResolveCollection
private boolean canResolveCollection(java.lang.String content, TypeSupport typeSupport, java.util.Map<java.lang.String,StructInfo> structs)
-
canReadInput
public boolean canReadInput()
-
canWriteOutput
public boolean canWriteOutput()
-
collectionContent
@Nullable public java.util.List<java.lang.String> collectionContent(TypeSupport typeSupport, java.util.Map<java.lang.String,StructInfo> structs)
-
createTypeSignature
java.lang.String createTypeSignature(javax.lang.model.util.Types types, javax.lang.model.type.TypeMirror type, java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> genericSignatures)
-
-