Interface JavaAnnotatedElement
- All Superinterfaces:
JavaModel, Serializable
- All Known Subinterfaces:
JavaClass, JavaConstructor, JavaExecutable, JavaField, JavaMethod, JavaPackage, JavaParameter
- All Known Implementing Classes:
DefaultJavaClass, DefaultJavaConstructor, DefaultJavaExecutable, DefaultJavaField, DefaultJavaMethod, DefaultJavaPackage, DefaultJavaParameter, DefaultJavaParameterizedType, DefaultJavaType, DefaultJavaTypeVariable, DefaultJavaWildcardType, JavaMethodDelegate
Equivalent of AnnotatedElement, providing the most important methods.
Where the original AnnotatedElement uses an Array, the JavaAnnotatedElement is using a List.
Where you can use Annotations, you can also use JavaDoc. For that reason all JavaDoc methods have been added to this interface.
- Since:
- 2.0
- Author:
- Robert Scholte
-
Method Summary
Modifier and TypeMethodDescriptionEquivalent ofAnnotatedElement.getAnnotations()Retrieve the javadoc comment of this annotated element.getNamedParameter(String tagName, String parameterName) Convenience method forgetTagByName(String).getNamedParameter(String)that also checks for null tag.getTagByName(String name) Retrieve the doclettag by the specified name.getTags()Retrieve all defined doclet tags.getTagsByName(String name) Retrieve all doclettags with a specific name.Methods inherited from interface JavaModel
getCodeBlock, getLineNumber
-
Method Details
-
getAnnotations
List<JavaAnnotation> getAnnotations()Equivalent ofAnnotatedElement.getAnnotations()- Returns:
- a list of Annotations, never
null
-
getComment
String getComment()Retrieve the javadoc comment of this annotated element. This is the part between/**and*/, but without the Standard doclet block tags. It may still contain Standard doclet inline tags, though.- Returns:
- the comment, otherwise
null
-
getTags
-
getTagsByName
-
getTagByName
-
getNamedParameter
Convenience method forgetTagByName(String).getNamedParameter(String)that also checks for null tag.- Parameters:
tagName- the tag nameparameterName- the parameter name- Returns:
- the value of the matching parameter, otherwise
null - Since:
- 1.3
-