public class JavaVisitorContext extends MutableConvertibleValuesMap<Object> implements VisitorContext
mapEMPTY| Constructor and Description |
|---|
JavaVisitorContext(Messager messager,
Elements elements,
AnnotationUtils annotationUtils,
Types types,
ModelUtils modelUtils,
Filer filer)
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fail(String message,
Element element)
Allows failing compilation for a given element with the given message.
|
AnnotationUtils |
getAnnotationUtils()
The annotation utils.
|
Optional<ClassElement> |
getClassElement(String name)
This method will lookup another class element by name.
|
Elements |
getElements()
The elements.
|
Messager |
getMessager()
The messager.
|
ModelUtils |
getModelUtils()
The model utils.
|
Types |
getTypes()
The types.
|
void |
info(String message)
Allows printing informational messages.
|
void |
info(String message,
Element element)
Allows printing informational messages.
|
Optional<GeneratedFile> |
visitGeneratedFile(String path)
Visit a file that will be located within the generated source directory.
|
Optional<GeneratedFile> |
visitMetaInfFile(String path)
Visit a file within the META-INF directory.
|
void |
warn(String message,
Element element)
Allows printing a warning for the given message and element.
|
clear, put, remove, toStringempty, get, names, valuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClassElementclear, of, put, putAll, putAll, removeasMap, asMap, contains, empty, forEach, getValueType, isEmpty, iterator, names, subMap, subMap, subMap, valuesget, get, get, getforEach, spliteratorpublic JavaVisitorContext(Messager messager, Elements elements, AnnotationUtils annotationUtils, Types types, ModelUtils modelUtils, Filer filer)
messager - The messagerelements - The elementsannotationUtils - The annotation utilstypes - Type typesmodelUtils - The model utilsfiler - The filerpublic Optional<ClassElement> getClassElement(String name)
VisitorContextgetClassElement in interface VisitorContextname - The namepublic void info(String message, Element element)
VisitorContextinfo in interface VisitorContextmessage - The messageelement - The elementpublic void info(String message)
VisitorContextinfo in interface VisitorContextmessage - The messagepublic void fail(String message, Element element)
VisitorContextfail in interface VisitorContextmessage - The messageelement - The elementpublic void warn(String message, Element element)
VisitorContextwarn in interface VisitorContextmessage - The messageelement - The elementpublic Optional<GeneratedFile> visitMetaInfFile(String path)
VisitorContextvisitMetaInfFile in interface VisitorContextpath - The path to the filepublic Optional<GeneratedFile> visitGeneratedFile(String path)
VisitorContextvisitGeneratedFile in interface VisitorContextpath - The path to the filepublic Messager getMessager()
public ModelUtils getModelUtils()
public Elements getElements()
public AnnotationUtils getAnnotationUtils()
public Types getTypes()