| Modifier and Type | Class and Description |
|---|---|
| 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. |
| Modifier and Type | Field and Description |
|---|---|
| private static final AnnotationValueVisitor |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static StringBuilder | |
| private static StringBuilder | |
| private static AnnotationValue | |
| private static Optional | |
| pack-priv static String | toString(AnnotationValue annotationValue)
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. |
| pack-priv static String | toString(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. |
| ARRAY_VISITOR | back to summary |
|---|---|
| private static final AnnotationValueVisitor<AnnotationValue, AnnotationValue> ARRAY_VISITOR | |
| AnnotationOutput | back to summary |
|---|---|
| private AnnotationOutput() | |
| appendEscaped | back to summary |
|---|---|
| private static void appendEscaped(StringBuilder sb, char c) | |
| appendQuoted | back to summary |
|---|---|
| private static StringBuilder appendQuoted(StringBuilder sb, String s) | |
| appendQuoted | back to summary |
|---|---|
| private static StringBuilder appendQuoted(StringBuilder sb, char c) | |
| maybeShorten | back to summary |
|---|---|
| private static AnnotationValue maybeShorten(AnnotationValue value) | |
| shortForm | back to summary |
|---|---|
| private static Optional | |
| toString | back to summary |
|---|---|
| pack-priv static String toString(AnnotationValue annotationValue) 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. | |
| toString | back to summary |
|---|---|
| pack-priv static String toString(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. | |
@NestedAnnotation(...), while in an initializer it must be written as an object, for
example the construction of an @AutoAnnotation class. That's why we have this abstract
class and two concrete subclasses.
| Access | Constructor and Description |
|---|---|
| private |
| SourceFormVisitor | back to summary |
|---|---|
| private SourceFormVisitor() | |
| defaultAction | back to summary |
|---|---|
| protected @Nullable Void defaultAction(Object value, StringBuilder sb) Overrides javax. Doc from javax. The default action for visit methods.
| |
| formatType | back to summary |
|---|---|
| private String formatType(TypeMirror typeMirror) | |
| visitAnnotation | back to summary |
|---|---|
| public @Nullable Void visitAnnotation(AnnotationMirror a, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits an annotation value in an annotation.
| |
| visitArray | back to summary |
|---|---|
| public @Nullable Void visitArray(List<? extends AnnotationValue> values, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits an array value in an annotation.
| |
| visitByte | back to summary |
|---|---|
| public @Nullable Void visitByte(byte b, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a
| |
| visitChar | back to summary |
|---|---|
| public @Nullable Void visitChar(char c, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a
| |
| visitDouble | back to summary |
|---|---|
| public @Nullable Void visitDouble(double d, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a
| |
| visitEnumConstant | back to summary |
|---|---|
| public @Nullable Void visitEnumConstant(VariableElement c, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits an
| |
| visitFloat | back to summary |
|---|---|
| public @Nullable Void visitFloat(float f, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a
| |
| visitLong | back to summary |
|---|---|
| public @Nullable Void visitLong(long i, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a
| |
| visitShort | back to summary |
|---|---|
| public @Nullable Void visitShort(short s, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a
| |
| visitString | back to summary |
|---|---|
| public @Nullable Void visitString(String s, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a string value in an annotation.
| |
| visitType | back to summary |
|---|---|
| public @Nullable Void visitType(TypeMirror classConstant, StringBuilder sb) Overrides javax. Implements javax. Doc from javax. Visits a type value in an annotation.
| |