class AnnotationOutput
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
AnnotationOutput.AnnotationSourceFormVisitor |
private class |
AnnotationOutput.InitializerSourceFormVisitor |
private class |
AnnotationOutput.SourceFormVisitor
Visitor that produces a string representation of an annotation value, suitable for inclusion
in a Java source file as an annotation member or as the initializer of a variable of the
appropriate type.
|
Modifier and Type | Field and Description |
---|---|
private TypeSimplifier |
typeSimplifier |
Constructor and Description |
---|
AnnotationOutput(TypeSimplifier typeSimplifier) |
Modifier and Type | Method and Description |
---|---|
private static void |
appendEscaped(java.lang.StringBuilder sb,
char c) |
private static java.lang.StringBuilder |
appendQuoted(java.lang.StringBuilder sb,
char c) |
private static java.lang.StringBuilder |
appendQuoted(java.lang.StringBuilder sb,
java.lang.String s) |
(package private) java.lang.String |
sourceFormForAnnotation(javax.lang.model.element.AnnotationMirror annotationMirror)
Returns a string representation of the given annotation mirror, suitable for inclusion in a
Java source file to reproduce the annotation in source form.
|
(package private) java.lang.String |
sourceFormForInitializer(javax.lang.model.element.AnnotationValue annotationValue,
javax.annotation.processing.ProcessingEnvironment processingEnv,
java.lang.String memberName,
javax.lang.model.element.Element context)
Returns a string representation of the given annotation value, suitable for inclusion in a Java
source file as the initializer of a variable of the appropriate type.
|
private final TypeSimplifier typeSimplifier
AnnotationOutput(TypeSimplifier typeSimplifier)
java.lang.String sourceFormForInitializer(javax.lang.model.element.AnnotationValue annotationValue, javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.String memberName, javax.lang.model.element.Element context)
java.lang.String sourceFormForAnnotation(javax.lang.model.element.AnnotationMirror annotationMirror)
private static java.lang.StringBuilder appendQuoted(java.lang.StringBuilder sb, java.lang.String s)
private static java.lang.StringBuilder appendQuoted(java.lang.StringBuilder sb, char c)
private static void appendEscaped(java.lang.StringBuilder sb, char c)