public class AnnotationDescPrinter extends AnnotationVisitor<java.lang.Object,java.lang.Object>
AnnotationDescParser
Constructor and Description |
---|
AnnotationDescPrinter(boolean sort,
java.lang.StringBuilder b) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
makePlainDescriptor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns an annotation descriptor that has no parameters.
|
static java.lang.String |
makePlainDescriptor(java.lang.String annotationType)
Returns an annotation descriptor that has no parameters.
|
java.lang.Object |
visit(java.lang.annotation.Annotation value)
Prints the annotation to the builder passed to the constructor.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.annotation.Annotation[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.annotation.Annotation value,
java.lang.Object param)
Visits an annotation by breaking it down into its components and calling
various other visit methods.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
boolean[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
boolean value,
java.lang.Object param)
Override to visit booleans.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
byte[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
byte value,
java.lang.Object param)
Override to visit bytes.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
char[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
char value,
java.lang.Object param)
Override to visit chars.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.Class[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.Class value,
java.lang.Object param)
Override to visit Classes.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
double[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
double value,
java.lang.Object param)
Override to visit doubles.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.Enum[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.Enum value,
java.lang.Object param)
Override to visit Enums.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
float[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
float value,
java.lang.Object param)
Override to visit floats.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
int[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
int value,
java.lang.Object param)
Override to visit ints.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
long[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
long value,
java.lang.Object param)
Override to visit longs.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
short[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
short value,
java.lang.Object param)
Override to visit shorts.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.String[] value,
java.lang.Object param)
Visits each array element.
|
java.lang.Object |
visit(java.lang.String name,
int pos,
java.lang.String value,
java.lang.Object param)
Override to visit Strings.
|
visit
public AnnotationDescPrinter(boolean sort, java.lang.StringBuilder b)
sort
- when true, sort annotation members by name (case sensitive)b
- StringBuilder to get printed resultspublic static java.lang.String makePlainDescriptor(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
public static java.lang.String makePlainDescriptor(java.lang.String annotationType)
public java.lang.Object visit(java.lang.annotation.Annotation value)
value
- Annotation to visitpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.annotation.Annotation value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array member or not part of an annotationpos
- position of member in list or arrayvalue
- Annotation visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, int value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- int visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, long value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- long visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, float value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- float visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, double value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- double visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, boolean value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- boolean visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, byte value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- byte visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, short value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- short visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, char value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- char visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.String value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- String visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.Class value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- Class visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.Enum value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- Enum visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.annotation.Annotation[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- Annotation array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, int[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- int array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, long[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- long array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, float[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- float array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, double[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- double array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, boolean[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- boolean array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, byte[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- byte array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, short[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- short array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, char[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- char array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.String[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- String array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.Class[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- Class array visitedparam
- custom parameterpublic java.lang.Object visit(java.lang.String name, int pos, java.lang.Enum[] value, java.lang.Object param)
AnnotationVisitor
visit
in class AnnotationVisitor<java.lang.Object,java.lang.Object>
name
- member name, or null if array memberpos
- position of member in list or arrayvalue
- Enum array visitedparam
- custom parameterCopyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.