Top Description Fields Constructors Methods
io.vertx.codegen

public Class ClassModel

extends Object
implements Model
Class Inheritance
All Implemented Interfaces
io.vertx.codegen.Model
Imports
io.vertx.codegen.annotations.CacheReturn, .Fluent, .GenIgnore, .VertxGen, io.vertx.codegen.doc.Doc, .Tag, .Text, .Token, io.vertx.codegen.type.*, javax.annotation.processing.Messager, .ProcessingEnvironment, javax.lang.model.element.*, javax.lang.model.type.*, javax.lang.model.util.Elements, .Types, javax.tools.Diagnostic, java.util.*, java.util.logging.Logger, java.util.stream.Collectors, .Stream

A processed source.
Author
Tim Fox

Field Summary

Modifier and TypeField and Description
protected List<TypeInfo>
protected List<AnnotationValueInfo>
protected final AnnotationValueInfoFactory
protected LinkedHashMap<ExecutableElement, MethodInfo>
private static final ClassTypeInfo
protected Set<ClassTypeInfo>
protected boolean
protected TypeInfo
protected List<ConstantInfo>
protected boolean
protected Text
protected Doc
protected final Doc.Factory
protected final Elements
protected final ProcessingEnvironment
public static final String
protected TypeInfo[]
protected Set<MethodInfo>
private static final ClassTypeInfo
protected TypeInfo
protected String
protected String
protected String
protected String
protected Set<ClassTypeInfo>
public static final String
protected TypeInfo
public static final String
protected TypeInfo
public static final String
public static final String
private static final Logger
protected final Messager
protected Map<String, List<AnnotationValueInfo>>
protected Map<String, List<MethodInfo>>
protected LinkedHashMap<ExecutableElement, MethodInfo>
protected final TypeElement
protected boolean
protected TypeInfo
protected Set<ClassTypeInfo>
protected Set<EnumTypeInfo>
protected Set<ApiTypeInfo>
private List<TypeInfo>
protected List<TypeInfo>
protected ClassTypeInfo
protected final TypeMirrorFactory
protected final Types
public static final String
public static final String
public static final String
public static final String
public static final String
protected TypeInfo

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
checkMethod(MethodInfo methodInfo)

protected void
checkParamType(ExecutableElement elem, TypeInfo typeInfo, int pos, int numParams, boolean allowAnyJavaType)

protected void
checkReturnType(ExecutableElement elem, TypeInfo type, boolean allowAnyJavaType)

private MethodInfo
createMethod(ExecutableElement modelMethod, boolean allowAnyJavaType)

protected MethodInfo
createMethodInfo(Set<ClassTypeInfo> ownerTypes, String methodName, String comment, Doc doc, TypeInfo returnType, Text returnDescription, boolean isFluent, boolean isCacheReturn, List<ParamInfo> mParams, ExecutableElement methodElt, boolean isStatic, boolean isDefault, ArrayList<TypeParamInfo.Method> typeParams, TypeElement declaringElt, boolean methodDeprecated, Text methodDeprecatedDesc, boolean useFutures, boolean methodOverride)

private void
private TypeInfo
extractArg(String subType, DeclaredType declaredType)

private TypeInfo[]
extractArgs(String subType, DeclaredType declaredType)

private ConstantInfo
fieldMethod(Types typeUtils, VariableElement modelField, boolean allowAnyJavaType)

public List<TypeInfo>
public List<AnnotationValueInfo>

Returns:

all the annotations on this class
getAnnotations
()

Overrides default io.vertx.codegen.Model.getAnnotations.

public List<MethodInfo>
public TypeInfo
public List<ConstantInfo>
public Text

Returns:

the description of deprecated
getDeprecatedDesc
()

public Doc
public TypeElement
public String
public TypeInfo[]
public TypeInfo
public String
public String
public String
public String
public Set<ClassTypeInfo>

Returns:

all classes that are not in the same package
getImportedTypes
()

public List<MethodInfo>
public TypeInfo
public TypeInfo
public String
public Map<String, List<AnnotationValueInfo>>

Returns:

a map of the method's annotations for this class, by method name.
getMethodAnnotations
()

public Map<String, List<MethodInfo>>
public List<MethodInfo>
public ModuleInfo
public TypeInfo
public Set<ClassTypeInfo>

Returns:

all the referenced data object types
getReferencedDataObjectTypes
()

public Set<EnumTypeInfo>

Returns:

all the referenced enum types
getReferencedEnumTypes
()

public Set<ApiTypeInfo>

Returns:

all the referenced api types
getReferencedTypes
()

public List<MethodInfo>
public List<TypeInfo>
public List<TypeInfo>
public ClassTypeInfo
public List<TypeParamInfo.Class>
public Map<String, Object>
public TypeInfo
public boolean
public boolean

Returns:

true if the class has a @Deprecated annotation
isDeprecated
()

public boolean
public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
private void
public boolean
private void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abstractSuperTypesback to summary
protected List<TypeInfo> abstractSuperTypes
annotationsback to summary
protected List<AnnotationValueInfo> annotations
annotationValueInfoFactoryback to summary
protected final AnnotationValueInfoFactory annotationValueInfoFactory
anyJavaTypeMethodsback to summary
protected LinkedHashMap<ExecutableElement, MethodInfo> anyJavaTypeMethods
ASYNC_RESULT_TYPEback to summary
private static final ClassTypeInfo ASYNC_RESULT_TYPE
collectedTypesback to summary
protected Set<ClassTypeInfo> collectedTypes
concreteback to summary
protected boolean concrete
concreteSuperTypeback to summary
protected TypeInfo concreteSuperType
constantsback to summary
protected List<ConstantInfo> constants
deprecatedback to summary
protected boolean deprecated
deprecatedDescback to summary
protected Text deprecatedDesc
docback to summary
protected Doc doc
docFactoryback to summary
protected final Doc.Factory docFactory
elementUtilsback to summary
protected final Elements elementUtils
envback to summary
protected final ProcessingEnvironment env
FUNCTIONback to summary
public static final String FUNCTION
functionArgsback to summary
protected TypeInfo[] functionArgs
futureMethodsback to summary
protected Set<MethodInfo> futureMethods
HANDLER_TYPEback to summary
private static final ClassTypeInfo HANDLER_TYPE
handlerArgback to summary
protected TypeInfo handlerArg
ifaceCommentback to summary
protected String ifaceComment
ifaceFQCNback to summary
protected String ifaceFQCN
ifacePackageNameback to summary
protected String ifacePackageName
ifaceSimpleNameback to summary
protected String ifaceSimpleName
importedTypesback to summary
protected Set<ClassTypeInfo> importedTypes
ITERABLEback to summary
public static final String ITERABLE
iterableArgback to summary
protected TypeInfo iterableArg
ITERATORback to summary
public static final String ITERATOR
iteratorArgback to summary
protected TypeInfo iteratorArg
JSON_ARRAYback to summary
public static final String JSON_ARRAY
JSON_OBJECTback to summary
public static final String JSON_OBJECT
loggerback to summary
private static final Logger logger
messagerback to summary
protected final Messager messager
methodAnnotationsMapback to summary
protected Map<String, List<AnnotationValueInfo>> methodAnnotationsMap
methodMapback to summary
protected Map<String, List<MethodInfo>> methodMap
methodsback to summary
protected LinkedHashMap<ExecutableElement, MethodInfo> methods
modelEltback to summary
protected final TypeElement modelElt
processedback to summary
protected boolean processed
readStreamArgback to summary
protected TypeInfo readStreamArg
referencedDataObjectTypesback to summary
protected Set<ClassTypeInfo> referencedDataObjectTypes
referencedEnumTypesback to summary
protected Set<EnumTypeInfo> referencedEnumTypes
referencedTypesback to summary
protected Set<ApiTypeInfo> referencedTypes
superTypeArgumentsback to summary
private List<TypeInfo> superTypeArguments
superTypesback to summary
protected List<TypeInfo> superTypes
typeback to summary
protected ClassTypeInfo type
typeFactoryback to summary
protected final TypeMirrorFactory typeFactory
typeUtilsback to summary
protected final Types typeUtils
VERTXback to summary
public static final String VERTX
VERTX_ASYNC_RESULTback to summary
public static final String VERTX_ASYNC_RESULT
VERTX_HANDLERback to summary
public static final String VERTX_HANDLER
VERTX_READ_STREAMback to summary
public static final String VERTX_READ_STREAM
VERTX_WRITE_STREAMback to summary
public static final String VERTX_WRITE_STREAM
writeStreamArgback to summary
protected TypeInfo writeStreamArg

Constructor Detail

ClassModelback to summary
public ClassModel(ProcessingEnvironment env, TypeMirrorFactory typeFactory, TypeElement modelElt)

Method Detail

checkMethodback to summary
protected void checkMethod(MethodInfo methodInfo)
checkParamTypeback to summary
protected void checkParamType(ExecutableElement elem, TypeInfo typeInfo, int pos, int numParams, boolean allowAnyJavaType)
checkReturnTypeback to summary
protected void checkReturnType(ExecutableElement elem, TypeInfo type, boolean allowAnyJavaType)
createMethodback to summary
private MethodInfo createMethod(ExecutableElement modelMethod, boolean allowAnyJavaType)
createMethodInfoback to summary
protected MethodInfo createMethodInfo(Set<ClassTypeInfo> ownerTypes, String methodName, String comment, Doc doc, TypeInfo returnType, Text returnDescription, boolean isFluent, boolean isCacheReturn, List<ParamInfo> mParams, ExecutableElement methodElt, boolean isStatic, boolean isDefault, ArrayList<TypeParamInfo.Method> typeParams, TypeElement declaringElt, boolean methodDeprecated, Text methodDeprecatedDesc, boolean useFutures, boolean methodOverride)
determineApiTypesback to summary
private void determineApiTypes()
extractArgback to summary
private TypeInfo extractArg(String subType, DeclaredType declaredType)
extractArgsback to summary
private TypeInfo[] extractArgs(String subType, DeclaredType declaredType)
fieldMethodback to summary
private ConstantInfo fieldMethod(Types typeUtils, VariableElement modelField, boolean allowAnyJavaType)
getAbstractSuperTypesback to summary
public List<TypeInfo> getAbstractSuperTypes()
getAnnotationsback to summary
public List<AnnotationValueInfo> getAnnotations()

Overrides default io.vertx.codegen.Model.getAnnotations.

Returns:List<AnnotationValueInfo>

all the annotations on this class

getAnyJavaTypeMethodsback to summary
public List<MethodInfo> getAnyJavaTypeMethods()
getConcreteSuperTypeback to summary
public TypeInfo getConcreteSuperType()
getConstantsback to summary
public List<ConstantInfo> getConstants()
getDeprecatedDescback to summary
public Text getDeprecatedDesc()
Returns:Text

the description of deprecated

getDocback to summary
public Doc getDoc()
getElementback to summary
public TypeElement getElement()

Implements io.vertx.codegen.Model.getElement.

getFqnback to summary
public String getFqn()

Implements io.vertx.codegen.Model.getFqn.

Annotations
@Override
getFunctionArgsback to summary
public TypeInfo[] getFunctionArgs()
getHandlerArgback to summary
public TypeInfo getHandlerArg()
getIfaceCommentback to summary
public String getIfaceComment()
getIfaceFQCNback to summary
public String getIfaceFQCN()
getIfacePackageNameback to summary
public String getIfacePackageName()
getIfaceSimpleNameback to summary
public String getIfaceSimpleName()
getImportedTypesback to summary
public Set<ClassTypeInfo> getImportedTypes()
Returns:Set<ClassTypeInfo>

all classes that are not in the same package

getInstanceMethodsback to summary
public List<MethodInfo> getInstanceMethods()
getIterableArgback to summary
public TypeInfo getIterableArg()
getIteratorArgback to summary
public TypeInfo getIteratorArg()
getKindback to summary
public String getKind()

Implements io.vertx.codegen.Model.getKind.

Annotations
@Override
getMethodAnnotationsback to summary
public Map<String, List<AnnotationValueInfo>> getMethodAnnotations()
Returns:Map<String, List<AnnotationValueInfo>>

a map of the method's annotations for this class, by method name.

getMethodMapback to summary
public Map<String, List<MethodInfo>> getMethodMap()
getMethodsback to summary
public List<MethodInfo> getMethods()
getModuleback to summary
public ModuleInfo getModule()

Implements io.vertx.codegen.Model.getModule.

getReadStreamArgback to summary
public TypeInfo getReadStreamArg()
getReferencedDataObjectTypesback to summary
public Set<ClassTypeInfo> getReferencedDataObjectTypes()
Returns:Set<ClassTypeInfo>

all the referenced data object types

getReferencedEnumTypesback to summary
public Set<EnumTypeInfo> getReferencedEnumTypes()
Returns:Set<EnumTypeInfo>

all the referenced enum types

getReferencedTypesback to summary
public Set<ApiTypeInfo> getReferencedTypes()
Returns:Set<ApiTypeInfo>

all the referenced api types

getStaticMethodsback to summary
public List<MethodInfo> getStaticMethods()
getSuperTypeArgumentsback to summary
public List<TypeInfo> getSuperTypeArguments()
getSuperTypesback to summary
public List<TypeInfo> getSuperTypes()
getTypeback to summary
public ClassTypeInfo getType()
getTypeParamsback to summary
public List<TypeParamInfo.Class> getTypeParams()
getVarsback to summary
public Map<String, Object> getVars()

Overrides default io.vertx.codegen.Model.getVars.

Annotations
@Override
getWriteStreamArgback to summary
public TypeInfo getWriteStreamArg()
isConcreteback to summary
public boolean isConcrete()
isDeprecatedback to summary
public boolean isDeprecated()
Returns:boolean

true if the class has a @Deprecated annotation

isFunctionback to summary
public boolean isFunction()
isHandlerback to summary
public boolean isHandler()
isIterableback to summary
public boolean isIterable()
isIteratorback to summary
public boolean isIterator()
isObjectBoundback to summary
private boolean isObjectBound(TypeMirror bound)
isReadStreamback to summary
public boolean isReadStream()
isWriteStreamback to summary
public boolean isWriteStream()
logNonFuturesback to summary
private void logNonFutures()
processback to summary
public boolean process()

Implements io.vertx.codegen.Model.process.

processTypeAnnotationsback to summary
private void processTypeAnnotations()
sortMethodMapback to summary
private void sortMethodMap(Map<String, List<MethodInfo>> map)
traverseTypeback to summary
private void traverseType(Element elem)