Top Description Fields Constructors Methods
io.vertx.codegen

public Class ModuleInfo

extends Object
Class Inheritance
Imports
io.vertx.codegen.annotations.ModuleGen, io.vertx.codegen.format.Case, .KebabCase, io.vertx.codegen.type.TypeNameTranslator, javax.lang.model.element.AnnotationValue, .PackageElement, .TypeElement, .TypeParameterElement, javax.lang.model.type.DeclaredType, .TypeKind, .TypeMirror, javax.lang.model.util.Elements, .Types, java.lang.reflect.Method, java.util.Collections, .List, .Set, java.util.function.BiFunction

Describes a module.
Author
Julien Viet

Field Summary

Modifier and TypeField and Description
private static final BiFunction<Elements, String, Set<PackageElement>>
private static final BiFunction<Elements, String, Set<PackageElement>>
private final String
private final String
private final String
pack-priv final boolean

Constructor Summary

AccessConstructor and Description
public
ModuleInfo(String packageName, String name, String groupPackage, boolean useFutures)

Method Summary

Modifier and TypeMethod and Description
public String
public String

Returns:

the module name
getName
()

public String

Returns:

the module name in the specified case
getName
(Case
the formatting case
_case
)

public String

Returns:

the module package name, i.e the name of the package annotated with the ModuleGen annotation
getPackageName
()

public boolean

Returns:

whether the module declares asynchronous operations with future returning signatures
getUseFutures
()

public static ModuleInfo

Returns:

the module info
resolve
(Elements
the element utils
elementUtils
,
PackageElement
the package element
pkgElt
)

Resolve a module info for the specified pkgElt argument, returns null for undertermined.

public static PackageElement
public static DeclaredType
resolveJsonMapper(Elements elementUtils, Types typeUtils, PackageElement pkgElt, DeclaredType javaType)

public String

Returns:

the translated package name
translatePackageName
(String
the language, for instance groovy
lang
)

Translates the module package name for the specified lang parameter language.

public String

Returns:

the translated qualified name
translateQualifiedName
(String
the qualified name
qualifiedName
,
String
the language, for instance groovy
lang
)

Translate a given qualified name based on the module group package name and the specified lang parameter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

getPackageElementback to summary
private static final BiFunction<Elements, String, Set<PackageElement>> getPackageElement
getPackageElementJava8back to summary
private static final BiFunction<Elements, String, Set<PackageElement>> getPackageElementJava8
groupPackageback to summary
private final String groupPackage
nameback to summary
private final String name
packageNameback to summary
private final String packageName
useFuturesback to summary
pack-priv final boolean useFutures

Constructor Detail

ModuleInfoback to summary
public ModuleInfo(String packageName, String name, String groupPackage, boolean useFutures)

Method Detail

getGroupPackageback to summary
public String getGroupPackage()
getNameback to summary
public String getName()
Returns:String

the module name

getNameback to summary
public String getName(Case _case)
Parameters
_case:Case

the formatting case

Returns:String

the module name in the specified case

getPackageNameback to summary
public String getPackageName()
Returns:String

the module package name, i.e the name of the package annotated with the ModuleGen annotation

getUseFuturesback to summary
public boolean getUseFutures()
Returns:boolean

whether the module declares asynchronous operations with future returning signatures

resolveback to summary
public static ModuleInfo resolve(Elements elementUtils, PackageElement pkgElt)

Resolve a module info for the specified pkgElt argument, returns null for undertermined.

Parameters
elementUtils:Elements

the element utils

pkgElt:PackageElement

the package element

Returns:ModuleInfo

the module info

resolveFirstModuleGenAnnotatedPackageElementback to summary
public static PackageElement resolveFirstModuleGenAnnotatedPackageElement(Elements elementUtils, PackageElement pkgElt)
resolveJsonMapperback to summary
public static DeclaredType resolveJsonMapper(Elements elementUtils, Types typeUtils, PackageElement pkgElt, DeclaredType javaType)
translatePackageNameback to summary
public String translatePackageName(String lang)

Translates the module package name for the specified lang parameter language.

Parameters
lang:String

the language, for instance groovy

Returns:String

the translated package name

translateQualifiedNameback to summary
public String translateQualifiedName(String qualifiedName, String lang)

Translate a given qualified name based on the module group package name and the specified lang parameter.

Parameters
qualifiedName:String

the qualified name

lang:String

the language, for instance groovy

Returns:String

the translated qualified name