com.dslplatform.json.processor
Class StructInfo

java.lang.Object
  extended by com.dslplatform.json.processor.StructInfo

public class StructInfo
extends Object


Field Summary
 ExecutableElement annotatedConstructor
           
 ExecutableElement annotatedFactory
           
 AnnotationMirror annotation
           
 LinkedHashMap<String,AttributeInfo> attributes
           
 String binaryName
           
 BuilderInfo builder
           
 List<String> constants
           
 ConverterInfo converter
           
 TypeElement deserializeAs
           
 String deserializeName
           
 DeclaredType discoveredBy
           
 String discriminator
           
 TypeElement element
           
 Element enumConstantNameSource
           
 EnumSet<CompiledJson.Format> formats
           
 Map<String,TypeMirror> genericSignatures
           
 Set<StructInfo> implementations
           
 boolean isMinified
           
 boolean isObjectFormatFirst
           
 boolean isParameterized
           
 String jsonObjectReaderPath
           
 List<ExecutableElement> matchingConstructors
           
 Map<String,String> minifiedNames
           
 String name
           
 CompiledJson.ObjectFormatPolicy objectFormatPolicy
           
 CompiledJson.Behavior onUnknown
           
 Stack<String> path
           
 Set<Element> properties
           
 ObjectType type
           
 List<String> typeParametersNames
           
 CompiledJson.TypeSignature typeSignature
           
 Map<String,TypeMirror> unknowns
           
 
Constructor Summary
StructInfo(ConverterInfo converter, DeclaredType discoveredBy, TypeElement target, String name, String binaryName)
           
StructInfo(TypeElement element, DeclaredType discoveredBy, String name, String binaryName, ObjectType type, String jsonObjectReaderPath, List<ExecutableElement> matchingConstructors, ExecutableElement annotatedConstructor, ExecutableElement annotatedFactory, BuilderInfo builder, AnnotationMirror annotation, CompiledJson.Behavior onUnknown, CompiledJson.TypeSignature typeSignature, CompiledJson.ObjectFormatPolicy objectFormatPolicy, TypeElement deserializeAs, String discriminator, String deserializeName, Element enumConstantNameSource, boolean isMinified, CompiledJson.Format[] formats, Map<String,TypeMirror> genericSignatures)
           
 
Method Summary
static int calcHash(String name)
           
static int calcWeakHash(String name)
           
 boolean checkHashCollision()
           
 boolean createFromEmptyInstance()
           
 StructInfo getDeserializeTarget()
           
 boolean hasAnnotation()
           
 boolean hasCycles(Map<String,StructInfo> structs)
           
 boolean hasEmptyCtor()
           
 boolean hasKnownConversion()
           
 String pathDescription()
           
 void prepareMinifiedNames()
           
 ExecutableElement selectedConstructor()
           
 void setDeserializeTarget(StructInfo value)
           
 void sortAttributes()
           
 void useConstructor(ExecutableElement ctor)
           
 boolean usesCtorWithArguments()
           
 boolean usesEmptyCtor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

public final TypeElement element

discoveredBy

public final DeclaredType discoveredBy

name

public final String name

binaryName

public final String binaryName

type

public final ObjectType type

converter

public final ConverterInfo converter

jsonObjectReaderPath

public final String jsonObjectReaderPath

matchingConstructors

public final List<ExecutableElement> matchingConstructors

annotatedFactory

public final ExecutableElement annotatedFactory

annotatedConstructor

public final ExecutableElement annotatedConstructor

builder

public final BuilderInfo builder

implementations

public final Set<StructInfo> implementations

minifiedNames

public final Map<String,String> minifiedNames

annotation

public final AnnotationMirror annotation

onUnknown

public final CompiledJson.Behavior onUnknown

typeSignature

public final CompiledJson.TypeSignature typeSignature

objectFormatPolicy

public final CompiledJson.ObjectFormatPolicy objectFormatPolicy

deserializeAs

public final TypeElement deserializeAs

discriminator

public final String discriminator

deserializeName

public final String deserializeName

isMinified

public final boolean isMinified

formats

public final EnumSet<CompiledJson.Format> formats

isObjectFormatFirst

public final boolean isObjectFormatFirst

attributes

public final LinkedHashMap<String,AttributeInfo> attributes

properties

public final Set<Element> properties

constants

public final List<String> constants

enumConstantNameSource

public final Element enumConstantNameSource

path

public final Stack<String> path

unknowns

public final Map<String,TypeMirror> unknowns

isParameterized

public final boolean isParameterized

typeParametersNames

public final List<String> typeParametersNames

genericSignatures

public final Map<String,TypeMirror> genericSignatures
Constructor Detail

StructInfo

public StructInfo(TypeElement element,
                  DeclaredType discoveredBy,
                  String name,
                  String binaryName,
                  ObjectType type,
                  @Nullable
                  String jsonObjectReaderPath,
                  @Nullable
                  List<ExecutableElement> matchingConstructors,
                  @Nullable
                  ExecutableElement annotatedConstructor,
                  @Nullable
                  ExecutableElement annotatedFactory,
                  @Nullable
                  BuilderInfo builder,
                  @Nullable
                  AnnotationMirror annotation,
                  @Nullable
                  CompiledJson.Behavior onUnknown,
                  @Nullable
                  CompiledJson.TypeSignature typeSignature,
                  CompiledJson.ObjectFormatPolicy objectFormatPolicy,
                  @Nullable
                  TypeElement deserializeAs,
                  @Nullable
                  String discriminator,
                  @Nullable
                  String deserializeName,
                  @Nullable
                  Element enumConstantNameSource,
                  boolean isMinified,
                  @Nullable
                  CompiledJson.Format[] formats,
                  Map<String,TypeMirror> genericSignatures)

StructInfo

public StructInfo(ConverterInfo converter,
                  DeclaredType discoveredBy,
                  TypeElement target,
                  String name,
                  String binaryName)
Method Detail

selectedConstructor

@Nullable
public ExecutableElement selectedConstructor()

useConstructor

public void useConstructor(ExecutableElement ctor)

hasKnownConversion

public boolean hasKnownConversion()

usesEmptyCtor

public boolean usesEmptyCtor()

usesCtorWithArguments

public boolean usesCtorWithArguments()

hasEmptyCtor

public boolean hasEmptyCtor()

createFromEmptyInstance

public boolean createFromEmptyInstance()

hasAnnotation

public boolean hasAnnotation()

hasCycles

public boolean hasCycles(Map<String,StructInfo> structs)

calcHash

public static int calcHash(String name)

calcWeakHash

public static int calcWeakHash(String name)

getDeserializeTarget

@Nullable
public StructInfo getDeserializeTarget()

setDeserializeTarget

public void setDeserializeTarget(@Nullable
                                 StructInfo value)

pathDescription

public String pathDescription()

checkHashCollision

public boolean checkHashCollision()

prepareMinifiedNames

public void prepareMinifiedNames()

sortAttributes

public void sortAttributes()


Copyright © 2019. All rights reserved.