Comparable<AnnotationInfo>
public class AnnotationInfo extends Object implements Comparable<AnnotationInfo>
Modifier and Type | Class | Description |
---|---|---|
static class |
AnnotationInfo.AnnotationClassRef |
Stores a class descriptor in an annotation as a class type string, e.g.
|
static class |
AnnotationInfo.AnnotationEnumValue |
Class for wrapping an enum constant value (split into class name and constant name) referenced inside an
annotation.
|
static class |
AnnotationInfo.AnnotationParamValue |
A wrapper used to pair annotation parameter names with annotation parameter values.
|
Constructor | Description |
---|---|
AnnotationInfo(String annotationName,
List<AnnotationInfo.AnnotationParamValue> annotationParamValues) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(AnnotationInfo o) |
|
boolean |
equals(Object obj) |
|
String |
getAnnotationName() |
Get the name of the annotation.
|
List<AnnotationInfo.AnnotationParamValue> |
getAnnotationParamValues() |
Get the parameter value of the annotation.
|
Class<?> |
getAnnotationType() |
Get a class reference for the annotation.
|
static String[] |
getUniqueAnnotationNamesSorted(AnnotationInfo[] annotationInfo) |
From an array of AnnotationInfo objects, extract the annotation names, uniquify them, and sort them.
|
static String[] |
getUniqueAnnotationNamesSorted(Collection<AnnotationInfo> annotationInfo) |
From a collection of AnnotationInfo objects, extract the annotation names, uniquify them, and sort them.
|
int |
hashCode() |
|
String |
toString() |
|
void |
toString(StringBuilder buf) |
Render as a string, into a StringBuilder buffer.
|
public AnnotationInfo(String annotationName, List<AnnotationInfo.AnnotationParamValue> annotationParamValues)
annotationName
- The name of the annotation.annotationParamValues
- The annotation parameter values, or null if none.public String getAnnotationName()
public Class<?> getAnnotationType()
Class<?>
reference.public List<AnnotationInfo.AnnotationParamValue> getAnnotationParamValues()
public int compareTo(AnnotationInfo o)
compareTo
in interface Comparable<AnnotationInfo>
public void toString(StringBuilder buf)
buf
- The buffer.public static String[] getUniqueAnnotationNamesSorted(Collection<AnnotationInfo> annotationInfo)
annotationInfo
- The annotation info.public static String[] getUniqueAnnotationNamesSorted(AnnotationInfo[] annotationInfo)
annotationInfo
- The annotation info.Copyright © 2018. All rights reserved.