public class AnnotationParser extends Object
| Constructor and Description |
|---|
AnnotationParser(com.sun.javadoc.Parameter parameter,
DocletOptions options)
This creates an AnnotationParser for a parameter
|
AnnotationParser(com.sun.javadoc.ProgramElementDoc element,
DocletOptions options)
This creates an AnnotationParser for a method/field
|
| Modifier and Type | Method and Description |
|---|---|
List<com.sun.javadoc.ClassDoc> |
getAnnotationArrayTypes(String qualifiedAnnotationType,
String key,
String subKey)
This gets a list of string values from an annotations field that is itself an array of annotations
|
com.sun.javadoc.ClassDoc[] |
getAnnotationClassDocValues(String qualifiedAnnotationType,
String key)
This gets the values of an annotation as class docs
|
String |
getAnnotationValue(Collection<String> qualifiedAnnotationTypes,
String... keys)
This gets the value of the first annotation with the given FQN and attribute named key
|
String |
getAnnotationValue(String qualifiedAnnotationType,
String... keys)
This gets the value of the annotation with the given FQN and attribute named key
|
String[] |
getAnnotationValues(String qualifiedAnnotationType,
String key)
This gets the values of an annotation as strings
|
boolean |
isAnnotatedBy(String qualifiedAnnotationType)
This gets whether this is annotated by the given annotation
|
boolean |
isAnnotatedByPrefix(String qualifiedAnnotationTypePrefix)
This gets whether this is annotated by an annotation that starts with the given prefix
|
public AnnotationParser(com.sun.javadoc.ProgramElementDoc element,
DocletOptions options)
element - The method/field javadoc itemoptions - The doclet optionspublic AnnotationParser(com.sun.javadoc.Parameter parameter,
DocletOptions options)
parameter - The parameter javadoc itemoptions - The doclet optionspublic String getAnnotationValue(Collection<String> qualifiedAnnotationTypes, String... keys)
qualifiedAnnotationTypes - The FQN of the annotations to get the value ofkeys - The name of the attribute(s) of the annotation to get the value ofpublic String getAnnotationValue(String qualifiedAnnotationType, String... keys)
qualifiedAnnotationType - The FQN of the annotation to get the value ofkeys - The name of the attribute(s) of the annotation to get the value ofpublic com.sun.javadoc.ClassDoc[] getAnnotationClassDocValues(String qualifiedAnnotationType, String key)
qualifiedAnnotationType - The FQN of the annotationkey - The field name of the annotation to getpublic String[] getAnnotationValues(String qualifiedAnnotationType, String key)
qualifiedAnnotationType - The FQN of the annotationkey - The field name of the annotation to getpublic List<com.sun.javadoc.ClassDoc> getAnnotationArrayTypes(String qualifiedAnnotationType, String key, String subKey)
qualifiedAnnotationType - The fqn of the annotationkey - The key of the annotation field that is the array of annotationssubKey - The key inside each of the annotations in the array that we want to get the value ofpublic boolean isAnnotatedBy(String qualifiedAnnotationType)
qualifiedAnnotationType - The annotation type to check forpublic boolean isAnnotatedByPrefix(String qualifiedAnnotationTypePrefix)
qualifiedAnnotationTypePrefix - The annotation type prefix to check forCopyright © 2015. All rights reserved.