Top Inners Fields Constructors Methods
io.vertx.codegen

public Class CodeGen

extends Object
Class Inheritance
Imports
io.vertx.codegen.annotations.ModuleGen, io.vertx.codegen.type.ClassKind, .MapperInfo, .TypeMirrorFactory, javax.annotation.processing.ProcessingEnvironment, .RoundEnvironment, javax.lang.model.element.Element, .Modifier, .PackageElement, .TypeElement, javax.lang.model.type.DeclaredType, .ExecutableType, .TypeKind, .TypeMirror, javax.lang.model.util.Elements, .Types, java.util.*, java.util.function.Predicate, .Supplier, java.util.logging.Logger, java.util.stream.Stream

Author
Julien Viet

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static class
CodeGen.ModelEntry<E extends Element, M extends Model>

private static class

Field Summary

Modifier and TypeField and Description
private final Set<TypeElement>
private final List<CodeGen.Converter>
private final Elements
private final ProcessingEnvironment
pack-priv static final Map<ProcessingEnvironment, ClassLoader>
private static final Logger
private final Map<String, Map<String, Map.Entry<TypeElement, Model>>>
private final HashMap<String, PackageElement>
private static final List<ModelProvider>
private final TypeMirrorFactory
private final Types

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ClassModel
public DataObjectModel
public EnumModel
public Model
getModel(String fqcn, String kind)

public Stream<Map.Entry<? extends Element, ? extends Model>>
public ModuleModel
getModuleModel(String modulePackage)

private Stream<Map.Entry<PackageElement, ModuleModel>>
public PackageModel
private Stream<Map.Entry<PackageElement, PackageModel>>
public void
private void
processConverter(TypeElement converterElt, TypeMirror dataObjectType, List<String> selectors, ExecutableType methodType)

public void
public void
registerConverter(String className, String serializer, String... selectors)

private CodeGen.Resolved

Returns:

the resolved member
resolveMember
(Element
for reporting properly error
elt
,
TypeMirror
the type to resolve the member from
type
,
String
the member string name to resolve
member
)

Resolve the member of a given type

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allback to summary
private final Set<TypeElement> all
convertersback to summary
private final List<CodeGen.Converter> converters
elementUtilsback to summary
private final Elements elementUtils
envback to summary
private final ProcessingEnvironment env
loaderMapback to summary
pack-priv static final Map<ProcessingEnvironment, ClassLoader> loaderMap
loggerback to summary
private static final Logger logger
modelsback to summary
private final Map<String, Map<String, Map.Entry<TypeElement, Model>>> models
modulesback to summary
private final HashMap<String, PackageElement> modules
PROVIDERSback to summary
private static final List<ModelProvider> PROVIDERS
tmfback to summary
private final TypeMirrorFactory tmf
typeUtilsback to summary
private final Types typeUtils

Constructor Detail

CodeGenback to summary
public CodeGen(ProcessingEnvironment env)

Method Detail

getClassModelback to summary
public ClassModel getClassModel(String fqcn)
getDataObjectModelback to summary
public DataObjectModel getDataObjectModel(String fqcn)
getEnumModelback to summary
public EnumModel getEnumModel(String fqcn)
getModelback to summary
public Model getModel(String fqcn, String kind)
getModelsback to summary
public Stream<Map.Entry<? extends Element, ? extends Model>> getModels()
getModuleModelback to summary
public ModuleModel getModuleModel(String modulePackage)
getModuleModelsback to summary
private Stream<Map.Entry<PackageElement, ModuleModel>> getModuleModels()
getPackageModelback to summary
public PackageModel getPackageModel(String fqn)
getPackageModelsback to summary
private Stream<Map.Entry<PackageElement, PackageModel>> getPackageModels()
initback to summary
public void init(RoundEnvironment round, ClassLoader loader)
processConverterback to summary
private void processConverter(TypeElement converterElt, TypeMirror dataObjectType, List<String> selectors, ExecutableType methodType)
registerConverterback to summary
public void registerConverter(CodeGen.Converter b)
registerConverterback to summary
public void registerConverter(String className, String serializer, String... selectors)
resolveMemberback to summary
private CodeGen.Resolved resolveMember(Element elt, TypeMirror type, String member)

Resolve the member of a given type

Parameters
elt:Element

for reporting properly error

type:TypeMirror

the type to resolve the member from

member:String

the member string name to resolve

Returns:CodeGen.Resolved

the resolved member

io.vertx.codegen back to summary

public Class CodeGen.Converter

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final String
public final String
public final List<String>

Constructor Summary

AccessConstructor and Description
public
Converter(String className, String converter, List<String> selectors)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

classNameback to summary
public final String className
converterback to summary
public final String converter
selectorsback to summary
public final List<String> selectors

Constructor Detail

Converterback to summary
public Converter(String className, String converter, List<String> selectors)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
io.vertx.codegen back to summary

private Class CodeGen.ModelEntry<E extends Element, M extends Model>

extends Object
implements Map.Entry<E extends Element, M extends Model>
Class Inheritance
All Implemented Interfaces
java.util.Map.Entry

Field Summary

Modifier and TypeField and Description
private final E
private final Supplier<M>
private M

Constructor Summary

AccessConstructor and Description
private
ModelEntry(E key, Supplier<M> supplier)

Method Summary

Modifier and TypeMethod and Description
public E
getKey()

Implements java.util.Map.Entry.getKey.

Returns the key corresponding to this entry.

public M
getValue()

Implements java.util.Map.Entry.getValue.

Returns the value corresponding to this entry.

public M
setValue(M
new value to be stored in this entry
value
)

Implements java.util.Map.Entry.setValue.

Replaces the value corresponding to this entry with the specified value (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private final E key
supplierback to summary
private final Supplier<M> supplier
valueback to summary
private M value

Constructor Detail

ModelEntryback to summary
private ModelEntry(E key, Supplier<M> supplier)

Method Detail

getKeyback to summary
public E getKey()

Implements java.util.Map.Entry.getKey.

Doc from java.util.Map.Entry.getKey.

Returns the key corresponding to this entry.

Returns:E

the key corresponding to this entry

Annotations
@Override
getValueback to summary
public M getValue()

Implements java.util.Map.Entry.getValue.

Doc from java.util.Map.Entry.getValue.

Returns the value corresponding to this entry. If the mapping has been removed from the backing map (by the iterator's remove operation), the results of this call are undefined.

Returns:M

the value corresponding to this entry

Annotations
@Override
setValueback to summary
public M setValue(M value)

Implements java.util.Map.Entry.setValue.

Doc from java.util.Map.Entry.setValue.

Replaces the value corresponding to this entry with the specified value (optional operation). (Writes through to the map.) The behavior of this call is undefined if the mapping has already been removed from the map (by the iterator's remove operation).

Parameters
value:M

new value to be stored in this entry

Returns:M

old value corresponding to the entry

Annotations
@Override
io.vertx.codegen back to summary

private Class CodeGen.Resolved

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final Element
pack-priv final TypeMirror

Constructor Summary

AccessConstructor and Description
private
Resolved(Element element, TypeMirror type)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

elementback to summary
pack-priv final Element element
typeback to summary
pack-priv final TypeMirror type

Constructor Detail

Resolvedback to summary
private Resolved(Element element, TypeMirror type)