@Internal public class JavaVisitorContext extends Object implements VisitorContext
EMPTY| Constructor and Description | 
|---|
JavaVisitorContext(Messager messager,
                  Elements elements,
                  AnnotationUtils annotationUtils,
                  Types types,
                  ModelUtils modelUtils,
                  Filer filer,
                  MutableConvertibleValues<Object> visitorAttributes)
The default constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
MutableConvertibleValues<Object> | 
clear()
Clear all values. 
 | 
void | 
fail(String message,
    Element element)
Allows failing compilation for a given element with the given message. 
 | 
<T> Optional<T> | 
get(CharSequence name,
   ArgumentConversionContext<T> conversionContext)
Resolve the given property for the given name. 
 | 
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. 
 | 
Set<String> | 
names()  | 
MutableConvertibleValues<Object> | 
put(CharSequence key,
   Object value)
Insert a value for the given key and value. 
 | 
MutableConvertibleValues<Object> | 
remove(CharSequence key)
Remove a value for the given key. 
 | 
Collection<Object> | 
values()  | 
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. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClassElementof, putAll, putAllasMap, asMap, contains, empty, forEach, getValueType, isEmpty, iterator, subMap, subMap, subMapget, get, getforEach, spliteratorpublic JavaVisitorContext(Messager messager, Elements elements, AnnotationUtils annotationUtils, Types types, ModelUtils modelUtils, Filer filer, MutableConvertibleValues<Object> visitorAttributes)
messager - The messagerelements - The elementsannotationUtils - The annotation utilstypes - Type typesmodelUtils - The model utilsfiler - The filervisitorAttributes - The attributespublic 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()
public MutableConvertibleValues<Object> put(CharSequence key, @Nullable Object value)
MutableConvertibleValuesput in interface MutableConvertibleValues<Object>key - The keyvalue - The valuepublic MutableConvertibleValues<Object> remove(CharSequence key)
MutableConvertibleValuesremove in interface MutableConvertibleValues<Object>key - The keypublic MutableConvertibleValues<Object> clear()
MutableConvertibleValuesclear in interface MutableConvertibleValues<Object>public Set<String> names()
names in interface ConvertibleValues<Object>public Collection<Object> values()
values in interface ConvertibleValues<Object>public <T> Optional<T> get(CharSequence name, ArgumentConversionContext<T> conversionContext)
ValueResolverget in interface ValueResolver<CharSequence>T - The concrete typename - The nameconversionContext - The conversion context