Top Fields Constructors Methods
io.vertx.docgen

pack-priv Class Helper

extends Object
Class Inheritance
Imports
com.sun.source.tree.CompilationUnitTree, com.sun.source.util.DocTrees, javax.annotation.processing.ProcessingEnvironment, javax.lang.model.element.Element, .ElementKind, .ExecutableElement, .TypeElement, .TypeParameterElement, javax.lang.model.type.ArrayType, .DeclaredType, .ExecutableType, .PrimitiveType, .TypeKind, .TypeMirror, .TypeVariable, javax.lang.model.util.Elements, .Types, java.io.IOException, .Reader, java.util.Arrays, .List, java.util.function.Predicate, java.util.regex.Matcher, .Pattern

Author
Julien Viet

Field Summary

Modifier and TypeField and Description
pack-priv final DocTrees
pack-priv final Elements
pack-priv static final Pattern
private static final Pattern
P

pack-priv final Types

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean

Returns:

true when the checked element is an example
hasToBeTranslated
(Element
the elt to check
elt
)

Check the element is an example or not.

pack-priv boolean

Returns:

true when the checked element is an example
isExample
(Element
the elt to check
elt
)

Check the element is an example or not.

pack-priv boolean
matchesConstructor(Element elt, String memberName, Predicate<ExecutableElement> parametersMatcher)

pack-priv boolean
pack-priv boolean
matchesMethod(Element elt, String memberName, Predicate<ExecutableElement> parametersMatcher)

pack-priv Predicate<ExecutableElement>

Returns:

the matcher
parametersMatcher
(String[]
the parameter type names
parameterSignature
)

Return a matcher for parameters, given the parameter type signature of an executable element.

pack-priv String

Returns:

the source
readSource
(Element
the element to load
elt
)

Read the source code of the provided element, this returns the source of the entire related compilation unit.

pack-priv static String

Returns:

the string representation
toString
(TypeMirror
the type mirror
mirror
)

Compute the string representation of a type mirror.

pack-priv static void
toString(TypeMirror
the type mirror
mirror
,
StringBuilder
the buffer appended with the string representation
buffer
)

Compute the string representation of a type mirror.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

docTreesback to summary
pack-priv final DocTrees docTrees
elementUtilsback to summary
pack-priv final Elements elementUtils
LANG_PATTERNback to summary
pack-priv static final Pattern LANG_PATTERN
Pback to summary
private static final Pattern P
typeUtilsback to summary
pack-priv final Types typeUtils

Constructor Detail

Helperback to summary
public Helper(ProcessingEnvironment env)

Method Detail

hasToBeTranslatedback to summary
pack-priv boolean hasToBeTranslated(Element elt)

Check the element is an example or not.

Parameters
elt:Element

the elt to check

Returns:boolean

true when the checked element is an example

isExampleback to summary
pack-priv boolean isExample(Element elt)

Check the element is an example or not.

Parameters
elt:Element

the elt to check

Returns:boolean

true when the checked element is an example

matchesConstructorback to summary
pack-priv boolean matchesConstructor(Element elt, String memberName, Predicate<ExecutableElement> parametersMatcher)
matchesFieldOrEnumConstantback to summary
pack-priv boolean matchesFieldOrEnumConstant(Element elt, String memberName)
matchesMethodback to summary
pack-priv boolean matchesMethod(Element elt, String memberName, Predicate<ExecutableElement> parametersMatcher)
parametersMatcherback to summary
pack-priv Predicate<ExecutableElement> parametersMatcher(String[] parameterSignature)

Return a matcher for parameters, given the parameter type signature of an executable element. The parameter signature is a list of parameter types formatted as a signature, i.e all types are raw, or primitive, or arrays. Unqualified types are resolved against the import of the specified compilationUnitTree argument.

Parameters
parameterSignature:String[]

the parameter type names

Returns:Predicate<ExecutableElement>

the matcher

readSourceback to summary
pack-priv String readSource(Element elt)

Read the source code of the provided element, this returns the source of the entire related compilation unit.

Parameters
elt:Element

the element to load

Returns:String

the source

toStringback to summary
pack-priv static String toString(TypeMirror mirror)

Compute the string representation of a type mirror.

Parameters
mirror:TypeMirror

the type mirror

Returns:String

the string representation

toStringback to summary
pack-priv static void toString(TypeMirror mirror, StringBuilder buffer)

Compute the string representation of a type mirror.

Parameters
mirror:TypeMirror

the type mirror

buffer:StringBuilder

the buffer appended with the string representation