Package com.thoughtworks.qdox.model
Interface JavaAnnotatedElement
-
- All Superinterfaces:
JavaModel
,java.io.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
public interface JavaAnnotatedElement extends JavaModel
Equivalent of
AnnotatedElement
, providing the most important methods. Where the original AnnotatedElement uses an Array, the JavaAnnotatedElement is using aList
.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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<JavaAnnotation>
getAnnotations()
Equivalent ofAnnotatedElement.getAnnotations()
java.lang.String
getComment()
Retrieve the javadoc comment of this annotated element.java.lang.String
getNamedParameter(java.lang.String tagName, java.lang.String parameterName)
Convenience method forgetTagByName(String).getNamedParameter(String)
that also checks for null tag.DocletTag
getTagByName(java.lang.String name)
Retrieve the doclettag by the specified name.java.util.List<DocletTag>
getTags()
Retrieve all defined doclet tags.java.util.List<DocletTag>
getTagsByName(java.lang.String name)
Retrieve all doclettags with a specific name.-
Methods inherited from interface com.thoughtworks.qdox.model.JavaModel
getCodeBlock, getLineNumber
-
-
-
-
Method Detail
-
getAnnotations
java.util.List<JavaAnnotation> getAnnotations()
Equivalent ofAnnotatedElement.getAnnotations()
- Returns:
- a list of Annotations, never
null
-
getComment
java.lang.String getComment()
Retrieve the javadoc comment of this annotated element. This is the part between /** and the */, but without the doclet tags- Returns:
- the comment, otherwise
null
-
getTags
java.util.List<DocletTag> getTags()
Retrieve all defined doclet tags.- Returns:
- a list of DocletTags, never
null
-
getTagsByName
java.util.List<DocletTag> getTagsByName(java.lang.String name)
Retrieve all doclettags with a specific name.- Parameters:
name
- the name of the doclet tag- Returns:
- a list of doclettags, never
null
-
getTagByName
DocletTag getTagByName(java.lang.String name)
Retrieve the doclettag by the specified name. If there are more than one tags, only return the first one.- Parameters:
name
- the name of the doclettag trying to retrieve- Returns:
- the first doclettag matching the name, otherwise
null
-
getNamedParameter
java.lang.String getNamedParameter(java.lang.String tagName, java.lang.String parameterName)
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
-
-