com.dslplatform.json.processor
Class Analysis
java.lang.Object
com.dslplatform.json.processor.Analysis
public class Analysis
- extends Object
|
Constructor Summary |
Analysis(ProcessingEnvironment processingEnv,
AnnotationUsage annotationUsage,
LogLevel logLevel,
TypeSupport typeSupport)
|
Analysis(ProcessingEnvironment processingEnv,
AnnotationUsage annotationUsage,
LogLevel logLevel,
TypeSupport typeSupport,
Set<String> alternativeIgnore,
Map<String,List<Analysis.AnnotationMapping<Boolean>>> alternativeNonNullable,
Map<String,String> alternativeAlias,
Map<String,List<Analysis.AnnotationMapping<Boolean>>> alternativeMandatory,
Set<String> alternativeCreators,
Map<String,String> alternativeIndex,
UnknownTypes unknownTypes,
boolean onlyBasicFeatures,
boolean includeFields,
boolean includeBeanMethods,
boolean includeExactMethods)
|
|
Method Summary |
Map<String,StructInfo> |
analyze()
|
static String |
beanOrActualName(String name)
|
static boolean |
booleanAnnotationValue(AnnotationMirror ann,
String method,
boolean defaultValue)
|
static String |
classDiscriminator(AnnotationMirror annotation)
|
static String |
className(AnnotationMirror annotation)
|
static TypeElement |
deserializeAs(AnnotationMirror annotation)
|
ExecutableElement |
findAnnotatedConstructor(Element element,
DeclaredType discoveredBy)
|
TypeMirror |
findConverter(Element property)
|
void |
findImplementations(Collection<StructInfo> structs)
|
List<ExecutableElement> |
findMatchingConstructors(Element element)
|
String |
findNameAlias(Element property,
AnnotationMirror dslAnn)
|
void |
findRelatedReferences()
|
AnnotationMirror |
getAnnotation(Element element,
DeclaredType annotationType)
|
Map<String,Analysis.AccessElements> |
getBeanProperties(TypeElement element,
Map<String,VariableElement> arguments)
|
Map<String,Analysis.AccessElements> |
getBuilderProperties(TypeElement element,
BuilderInfo builder,
boolean withBeans,
boolean withExact,
boolean withFields)
|
Map<String,Analysis.AccessElements> |
getExactProperties(TypeElement element,
Map<String,VariableElement> arguments)
|
CompiledJson.Format[] |
getFormats(AnnotationMirror ann)
|
Map<String,Analysis.AccessElements> |
getPublicFields(TypeElement element,
Map<String,VariableElement> arguments)
|
List<TypeElement> |
getTypeHierarchy(TypeElement element)
|
boolean |
hasError()
|
boolean |
hasIgnoredAnnotation(Element property)
|
boolean |
hasMandatoryAnnotation(Element property,
AnnotationMirror dslAnn)
|
boolean |
hasNonNullable(Element property,
AnnotationMirror dslAnn)
|
int |
index(Element property,
AnnotationMirror dslAnn)
|
boolean |
isFullMatch(Element property,
AnnotationMirror dslAnn)
|
boolean |
isMinified(AnnotationMirror ann)
|
static String |
objectName(String type)
|
void |
processAnnotation(DeclaredType currentAnnotationType,
Set<? extends Element> targets)
|
Map<String,Element> |
processConverters(Set<? extends Element> converters)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
compiledJsonElement
public final TypeElement compiledJsonElement
compiledJsonType
public final DeclaredType compiledJsonType
attributeElement
public final TypeElement attributeElement
attributeType
public final DeclaredType attributeType
converterElement
public final TypeElement converterElement
converterType
public final DeclaredType converterType
Analysis
public Analysis(ProcessingEnvironment processingEnv,
AnnotationUsage annotationUsage,
LogLevel logLevel,
TypeSupport typeSupport)
Analysis
public Analysis(ProcessingEnvironment processingEnv,
AnnotationUsage annotationUsage,
LogLevel logLevel,
TypeSupport typeSupport,
@Nullable
Set<String> alternativeIgnore,
@Nullable
Map<String,List<Analysis.AnnotationMapping<Boolean>>> alternativeNonNullable,
@Nullable
Map<String,String> alternativeAlias,
@Nullable
Map<String,List<Analysis.AnnotationMapping<Boolean>>> alternativeMandatory,
@Nullable
Set<String> alternativeCreators,
@Nullable
Map<String,String> alternativeIndex,
@Nullable
UnknownTypes unknownTypes,
boolean onlyBasicFeatures,
boolean includeFields,
boolean includeBeanMethods,
boolean includeExactMethods)
hasError
public boolean hasError()
processConverters
public Map<String,Element> processConverters(Set<? extends Element> converters)
processAnnotation
public void processAnnotation(DeclaredType currentAnnotationType,
Set<? extends Element> targets)
analyze
public Map<String,StructInfo> analyze()
getTypeHierarchy
public List<TypeElement> getTypeHierarchy(TypeElement element)
findRelatedReferences
public void findRelatedReferences()
objectName
public static String objectName(String type)
findMatchingConstructors
@Nullable
public List<ExecutableElement> findMatchingConstructors(Element element)
findAnnotatedConstructor
@Nullable
public ExecutableElement findAnnotatedConstructor(Element element,
DeclaredType discoveredBy)
beanOrActualName
public static String beanOrActualName(String name)
getBeanProperties
public Map<String,Analysis.AccessElements> getBeanProperties(TypeElement element,
Map<String,VariableElement> arguments)
getExactProperties
public Map<String,Analysis.AccessElements> getExactProperties(TypeElement element,
Map<String,VariableElement> arguments)
getPublicFields
public Map<String,Analysis.AccessElements> getPublicFields(TypeElement element,
Map<String,VariableElement> arguments)
getBuilderProperties
public Map<String,Analysis.AccessElements> getBuilderProperties(TypeElement element,
BuilderInfo builder,
boolean withBeans,
boolean withExact,
boolean withFields)
findImplementations
public void findImplementations(Collection<StructInfo> structs)
isFullMatch
public boolean isFullMatch(Element property,
@Nullable
AnnotationMirror dslAnn)
index
public int index(Element property,
@Nullable
AnnotationMirror dslAnn)
hasIgnoredAnnotation
public boolean hasIgnoredAnnotation(Element property)
getAnnotation
@Nullable
public AnnotationMirror getAnnotation(Element element,
DeclaredType annotationType)
hasNonNullable
public boolean hasNonNullable(Element property,
@Nullable
AnnotationMirror dslAnn)
deserializeAs
@Nullable
public static TypeElement deserializeAs(AnnotationMirror annotation)
classDiscriminator
public static String classDiscriminator(@Nullable
AnnotationMirror annotation)
className
public static String className(@Nullable
AnnotationMirror annotation)
hasMandatoryAnnotation
public boolean hasMandatoryAnnotation(Element property,
@Nullable
AnnotationMirror dslAnn)
booleanAnnotationValue
public static boolean booleanAnnotationValue(AnnotationMirror ann,
String method,
boolean defaultValue)
getFormats
public CompiledJson.Format[] getFormats(@Nullable
AnnotationMirror ann)
isMinified
public boolean isMinified(@Nullable
AnnotationMirror ann)
findConverter
@Nullable
public TypeMirror findConverter(Element property)
findNameAlias
@Nullable
public String findNameAlias(Element property,
@Nullable
AnnotationMirror dslAnn)
Copyright © 2019. All rights reserved.