Package com.google.auto.value.processor
Class AnnotationOutput
- java.lang.Object
-
- com.google.auto.value.processor.AnnotationOutput
-
final class AnnotationOutput extends java.lang.Object
Handling of default values for annotation members.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AnnotationOutput.AnnotationSourceFormVisitor
private static class
AnnotationOutput.InitializerSourceFormVisitor
private static 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.
-
Constructor Summary
Constructors Modifier Constructor Description private
AnnotationOutput()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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) static 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) static 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.
-
-
-
Method Detail
-
sourceFormForInitializer
static 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.
-
sourceFormForAnnotation
static 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.
-
appendQuoted
private static java.lang.StringBuilder appendQuoted(java.lang.StringBuilder sb, java.lang.String s)
-
appendQuoted
private static java.lang.StringBuilder appendQuoted(java.lang.StringBuilder sb, char c)
-
appendEscaped
private static void appendEscaped(java.lang.StringBuilder sb, char c)
-
-