Class TagElement
java.lang.Object
org.aspectj.org.eclipse.jdt.core.dom.ASTNode
org.aspectj.org.eclipse.jdt.core.dom.AbstractTagElement
org.aspectj.org.eclipse.jdt.core.dom.TagElement
- All Implemented Interfaces:
IDocElement
AST node for a tag within a doc comment.
Tag elements nested within another tag element are called
inline doc tags.
TagElement:
[ @ Identifier ] { DocElement }
{tagProperty = tagValue}
DocElement:
TextElement
Name
MethodRef
MemberRef
{ TagElement }
- Since:
- 3.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChildListPropertyDescriptorThe "fragments" structural property of this node type (element type:IDocElement).static final StringJavadoc tag name (value "@apiNote").static final StringStandard doc tag name (value "@author").static final StringStandard inline doc tag name (value "@code").static final StringStandard doc tag name (value "@deprecated").static final StringStandard inline doc tag name (value "@docRoot").static final StringStandard doc tag name (value "@exception").static final StringStandard doc tag name (value "@hidden").static final StringStandard snippet doc tag name (value "@highlight").static final StringJavadoc tag name (value "@implNote").static final StringJavadoc tag name (value "@implSpec").static final StringStandard doc tag name (value "@index").static final StringStandard inline doc tag name (value "@inheritDoc").static final StringStandard inline doc tag name (value "@link").static final StringStandard inline doc tag name (value "@linkplain").static final StringStandard inline doc tag name (value "@literal").static final SimplePropertyDescriptorThe "tagName" structural property of this node type (type:String).static final StringStandard doc tag name (value "@param").static final ChildListPropertyDescriptorThe "properties" structural property of this node type (element type:TagProperty).static final StringStandard doc tag name (value "@provides").static final StringStandard snippet doc tag name (value "@replace").static final StringStandard doc tag name (value "@return").static final StringStandard doc tag name (value "@see").static final StringStandard doc tag name (value "@serial").static final StringStandard doc tag name (value "@serialData").static final StringStandard doc tag name (value "@serialField").static final StringStandard doc tag name (value "@since").static final StringStandard inline doc tag name (value "@snippet").static final StringStandard doc tag name (value "@summary").static final StringStandard doc tag name (value "@throws").static final StringStandard doc tag name (value "@uses").static final StringStandard inline doc tag name (value "@value").static final StringStandard doc tag name (value "@version").Fields inherited from class ASTNode
ANNOTATION_TYPE_DECLARATION, ANNOTATION_TYPE_MEMBER_DECLARATION, ANONYMOUS_CLASS_DECLARATION, ARRAY_ACCESS, ARRAY_CREATION, ARRAY_INITIALIZER, ARRAY_TYPE, ASSERT_STATEMENT, ASSIGNMENT, BLOCK, BLOCK_COMMENT, BOOLEAN_LITERAL, BREAK_STATEMENT, CASE_DEFAULT_EXPRESSION, CAST_EXPRESSION, CATCH_CLAUSE, CHARACTER_LITERAL, CLASS_INSTANCE_CREATION, COMPILATION_UNIT, CONDITIONAL_EXPRESSION, CONSTRUCTOR_INVOCATION, CONTINUE_STATEMENT, CREATION_REFERENCE, DIMENSION, DO_STATEMENT, EitherOr_MultiPattern, EMPTY_STATEMENT, ENHANCED_FOR_STATEMENT, ENUM_CONSTANT_DECLARATION, ENUM_DECLARATION, EXPORTS_DIRECTIVE, EXPRESSION_METHOD_REFERENCE, EXPRESSION_STATEMENT, FIELD_ACCESS, FIELD_DECLARATION, FOR_STATEMENT, GUARDED_PATTERN, IF_STATEMENT, IMPORT_DECLARATION, INFIX_EXPRESSION, INITIALIZER, INSTANCEOF_EXPRESSION, INTERSECTION_TYPE, JAVADOC, JAVADOC_REGION, JAVADOC_TEXT_ELEMENT, LABELED_STATEMENT, LAMBDA_EXPRESSION, LINE_COMMENT, MALFORMED, MARKER_ANNOTATION, MEMBER_REF, MEMBER_VALUE_PAIR, METHOD_DECLARATION, METHOD_INVOCATION, METHOD_REF, METHOD_REF_PARAMETER, MODIFIER, MODULE_DECLARATION, MODULE_MODIFIER, MODULE_QUALIFIED_NAME, NAME_QUALIFIED_TYPE, NORMAL_ANNOTATION, NULL_LITERAL, NULL_PATTERN, NUMBER_LITERAL, OPENS_DIRECTIVE, ORIGINAL, PACKAGE_DECLARATION, PARAMETERIZED_TYPE, PARENTHESIZED_EXPRESSION, PATTERN_INSTANCEOF_EXPRESSION, POSTFIX_EXPRESSION, PREFIX_EXPRESSION, PRIMITIVE_TYPE, PROTECT, PROVIDES_DIRECTIVE, QUALIFIED_NAME, QUALIFIED_TYPE, RECORD_DECLARATION, RECORD_PATTERN, RECOVERED, REQUIRES_DIRECTIVE, RETURN_STATEMENT, SIMPLE_NAME, SIMPLE_TYPE, SINGLE_MEMBER_ANNOTATION, SINGLE_VARIABLE_DECLARATION, STRING_LITERAL, SUPER_CONSTRUCTOR_INVOCATION, SUPER_FIELD_ACCESS, SUPER_METHOD_INVOCATION, SUPER_METHOD_REFERENCE, SWITCH_CASE, SWITCH_EXPRESSION, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, TAG_ELEMENT, TAG_PROPERTY, TEXT_BLOCK, TEXT_ELEMENT, THIS_EXPRESSION, THROW_STATEMENT, TRY_STATEMENT, TYPE_DECLARATION, TYPE_DECLARATION_STATEMENT, TYPE_LITERAL, TYPE_METHOD_REFERENCE, TYPE_PARAMETER, TYPE_PATTERN, UNION_TYPE, UNNAMED_CLASS, USES_DIRECTIVE, VARIABLE_DECLARATION_EXPRESSION, VARIABLE_DECLARATION_FRAGMENT, VARIABLE_DECLARATION_STATEMENT, WHILE_STATEMENT, WILDCARD_TYPE, YIELD_STATEMENTModifier and TypeFieldDescriptionstatic final intNode type constant indicating a node of typeAnnotationTypeDeclaration.static final intNode type constant indicating a node of typeAnnotationTypeMemberDeclaration.static final intNode type constant indicating a node of typeAnonymousClassDeclaration.static final intNode type constant indicating a node of typeArrayAccess.static final intNode type constant indicating a node of typeArrayCreation.static final intNode type constant indicating a node of typeArrayInitializer.static final intNode type constant indicating a node of typeArrayType.static final intNode type constant indicating a node of typeAssertStatement.static final intNode type constant indicating a node of typeAssignment.static final intNode type constant indicating a node of typeBlock.static final intNode type constant indicating a node of typeBlockComment.static final intNode type constant indicating a node of typeBooleanLiteral.static final intNode type constant indicating a node of typeBreakStatement.static final intNode type constant indicating a node of typeCaseDefaultExpression.static final intNode type constant indicating a node of typeCastExpression.static final intNode type constant indicating a node of typeCatchClause.static final intNode type constant indicating a node of typeCharacterLiteral.static final intNode type constant indicating a node of typeClassInstanceCreation.static final intNode type constant indicating a node of typeCompilationUnit.static final intNode type constant indicating a node of typeConditionalExpression.static final intNode type constant indicating a node of typeConstructorInvocation.static final intNode type constant indicating a node of typeContinueStatement.static final intNode type constant indicating a node of typeCreationReference.static final intNode type constant indicating a node of typeDimension.static final intNode type constant indicating a node of typeDoStatement.static final intNode type constant indicating a node of typeEitherOrMultiPattern.static final intNode type constant indicating a node of typeEmptyStatement.static final intNode type constant indicating a node of typeEnhancedForStatement.static final intNode type constant indicating a node of typeEnumConstantDeclaration.static final intNode type constant indicating a node of typeEnumDeclaration.static final intNode type constant indicating a node of typeExportsDirective.static final intNode type constant indicating a node of typeExpressionMethodReference.static final intNode type constant indicating a node of typeExpressionStatement.static final intNode type constant indicating a node of typeFieldAccess.static final intNode type constant indicating a node of typeFieldDeclaration.static final intNode type constant indicating a node of typeForStatement.static final intNode type constant indicating a node of typeGuardedPattern.static final intNode type constant indicating a node of typeIfStatement.static final intNode type constant indicating a node of typeImportDeclaration.static final intNode type constant indicating a node of typeInfixExpression.static final intNode type constant indicating a node of typeInitializer.static final intNode type constant indicating a node of typeInstanceofExpression.static final intNode type constant indicating a node of typeIntersectionType.static final intNode type constant indicating a node of typeJavadoc.static final intNode type constant indicating a node of typeJavaDocRegion.static final intNode type constant indicating a node of typeTextElement.static final intNode type constant indicating a node of typeLabeledStatement.static final intNode type constant indicating a node of typeLambdaExpression.static final intNode type constant indicating a node of typeLineComment.static final intFlag constant (bit mask, value 1) indicating that there is something not quite right with this AST node.static final intNode type constant indicating a node of typeMarkerAnnotation.static final intNode type constant indicating a node of typeMemberRef.static final intNode type constant indicating a node of typeMemberValuePair.static final intNode type constant indicating a node of typeMethodDeclaration.static final intNode type constant indicating a node of typeMethodInvocation.static final intNode type constant indicating a node of typeMethodRef.static final intNode type constant indicating a node of typeMethodRefParameter.static final intNode type constant indicating a node of typeModifier.static final intNode type constant indicating a node of typeModuleDeclaration.static final intNode type constant indicating a node of typeModuleModifier.static final intNode type constant indicating a node of typeModuleQualifiedName.static final intNode type constant indicating a node of typeNameQualifiedType.static final intNode type constant indicating a node of typeNormalAnnotation.static final intNode type constant indicating a node of typeNullLiteral.static final intNode type constant indicating a node of typeNullPattern.static final intNode type constant indicating a node of typeNumberLiteral.static final intNode type constant indicating a node of typeOpensDirective.static final intFlag constant (bit mask, value 2) indicating that this is a node that was created by the parser (as opposed to one created by another party).static final intNode type constant indicating a node of typePackageDeclaration.static final intNode type constant indicating a node of typeParameterizedType.static final intNode type constant indicating a node of typeParenthesizedExpression.static final intNode type constant indicating a node of typePatternInstanceofExpression.static final intNode type constant indicating a node of typePostfixExpression.static final intNode type constant indicating a node of typePrefixExpression.static final intNode type constant indicating a node of typePrimitiveType.static final intFlag constant (bit mask, value 4) indicating that this node is unmodifiable.static final intNode type constant indicating a node of typeProvidesDirective.static final intNode type constant indicating a node of typeQualifiedName.static final intNode type constant indicating a node of typeQualifiedType.static final intNode type constant indicating a node of typeRecordDeclaration.static final intNode type constant indicating a node of typeRecordPattern.static final intFlag constant (bit mask, value 8) indicating that this node or a part of this node is recovered from source that contains a syntax error detected in the vicinity.static final intNode type constant indicating a node of typeRequiresDirective.static final intNode type constant indicating a node of typeReturnStatement.static final intNode type constant indicating a node of typeSimpleName.static final intNode type constant indicating a node of typeSimpleType.static final intNode type constant indicating a node of typeSingleMemberAnnotation.static final intNode type constant indicating a node of typeSingleVariableDeclaration.static final intNode type constant indicating a node of typeStringLiteral.static final intNode type constant indicating a node of typeSuperConstructorInvocation.static final intNode type constant indicating a node of typeSuperFieldAccess.static final intNode type constant indicating a node of typeSuperMethodInvocation.static final intNode type constant indicating a node of typeSuperMethhodReference.static final intNode type constant indicating a node of typeSwitchCase.static final intNode type constant indicating a node of typeSwitchExpression.static final intNode type constant indicating a node of typeSwitchStatement.static final intNode type constant indicating a node of typeSynchronizedStatement.static final intNode type constant indicating a node of typeTagElement.static final intNode type constant indicating a node of typeTagProperty.static final intNode type constant indicating a node of typeTextBlock.static final intNode type constant indicating a node of typeTextElement.static final intNode type constant indicating a node of typeThisExpression.static final intNode type constant indicating a node of typeThrowStatement.static final intNode type constant indicating a node of typeTryStatement.static final intNode type constant indicating a node of typeTypeDeclaration.static final intNode type constant indicating a node of typeTypeDeclarationStatement.static final intNode type constant indicating a node of typeTypeLiteral.static final intNode type constant indicating a node of typeTypeMethodReference.static final intNode type constant indicating a node of typeTypeParameter.static final intNode type constant indicating a node of typeTypePattern.static final intNode type constant indicating a node of typeUnionType.static final intstatic final intNode type constant indicating a node of typeUsesDirective.static final intNode type constant indicating a node of typeVariableDeclarationExpression.static final intNode type constant indicating a node of typeVariableDeclarationFragment.static final intNode type constant indicating a node of typeVariableDeclarationStatement.static final intNode type constant indicating a node of typeWhileStatement.static final intNode type constant indicating a node of typeWildcardType.static final intNode type constant indicating a node of typeYieldStatement. -
Method Summary
Modifier and TypeMethodDescriptionstatic ListpropertyDescriptors(int apiLevel) Returns a list of structural property descriptors for this node type.Returns the live list of tag properties in this tag element.Returns the list of non dummy JavaDopRegions in this tag element.tagRegionsContainingTextElement(ASTNode docElem) Returns the list of non dummy JavaDocRegions containing this ASTNode and IDocElement.tagRegionsStartingAtTextElement(ASTNode docElem) Returns the list of non dummy JavaDocRegions starting at this ASTNode and IDocElement.Methods inherited from class AbstractTagElement
fragments, getTagName, getTagNameProperty, internalTagNamePropertyFactory, isNested, setTagNameModifier and TypeMethodDescriptionReturns the live list of fragments in this tag element.Returns this node's tag name, ornullif none.final SimplePropertyDescriptorReturns structural property descriptor for the "name" property of this node (child type:SimpleName).static final SimplePropertyDescriptorinternalTagNamePropertyFactory(Class nodeClass) The "tagName" structural property of this node type (type:String).booleanisNested()Returns whether this tag element is nested within another tag element.voidsetTagName(String tagName) Sets the tag name of this node to the given value.Methods inherited from class ASTNode
accept, copySubtree, copySubtrees, delete, equals, getAST, getFlags, getLength, getLocationInParent, getNodeType, getParent, getProperty, getRoot, getStartPosition, getStructuralProperty, hashCode, nodeClassForType, properties, setFlags, setProperty, setSourceRange, setStructuralProperty, structuralPropertiesForType, subtreeBytes, subtreeMatch, toStringModifier and TypeMethodDescriptionfinal voidaccept(ASTVisitor visitor) Accepts the given visitor on a visit of the current node.static ASTNodecopySubtree(AST target, ASTNode node) Returns a deep copy of the subtree of AST nodes rooted at the given node.static ListcopySubtrees(AST target, List nodes) Returns a deep copy of the subtrees of AST nodes rooted at the given list of nodes.final voiddelete()Removes this node from its parent.final booleanTheASTNodeimplementation of thisObjectmethod uses object identity (==).final ASTgetAST()Returns this node's AST.final intgetFlags()Returns the flags associated with this node.final intReturns the length in characters of the original source file indicating where the source fragment corresponding to this node ends.Returns the location of this node within its parent, ornullif this is a root node.final intReturns an integer value identifying the type of this concrete AST node.final ASTNodeReturns this node's parent node, ornullif this is the root node.final ObjectgetProperty(String propertyName) Returns the value of the named property of this node, ornullif none.final ASTNodegetRoot()Returns the root node at or above this node; returns this node if it is a root.final intReturns the character index into the original source file indicating where the source fragment corresponding to this node begins.final ObjectReturns the value of the given structural property for this node.final inthashCode()static ClassnodeClassForType(int nodeType) Returns the node class for the corresponding node type.final MapReturns an unmodifiable table of the properties of this node with non-nullvalues.final voidsetFlags(int flags) Sets the flags associated with this node to the given value.final voidsetProperty(String propertyName, Object data) Sets the named property of this node to the given value, or tonullto clear it.final voidsetSourceRange(int startPosition, int length) Sets the source range of the original source file where the source fragment corresponding to this node was found.final voidsetStructuralProperty(StructuralPropertyDescriptor property, Object value) Sets the value of the given structural property for this node.final ListReturns a list of structural property descriptors for nodes of the same type as this node.final intReturns an estimate of the memory footprint in bytes of the entire subtree rooted at this node.final booleansubtreeMatch(ASTMatcher matcher, Object other) Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher.final StringtoString()Returns a string representation of this node suitable for debugging purposes only.
-
Field Details
-
TAG_NAME_PROPERTY
The "tagName" structural property of this node type (type:String). -
FRAGMENTS_PROPERTY
The "fragments" structural property of this node type (element type:IDocElement). -
TAG_PROPERTIES_PROPERTY
The "properties" structural property of this node type (element type:TagProperty).- Since:
- 3.30
-
TAG_AUTHOR
-
TAG_CODE
Standard inline doc tag name (value "@code").Note that this tag first appeared in J2SE 5.
- Since:
- 3.30
- See Also:
-
TAG_DEPRECATED
Standard doc tag name (value "@deprecated").- Since:
- 3.30
- See Also:
-
TAG_DOCROOT
-
TAG_EXCEPTION
Standard doc tag name (value "@exception").- Since:
- 3.30
- See Also:
-
TAG_HIDDEN
Standard doc tag name (value "@hidden").- Since:
- 3.30
- See Also:
-
TAG_INDEX
-
TAG_INHERITDOC
Standard inline doc tag name (value "@inheritDoc").- Since:
- 3.30
- See Also:
-
TAG_LINK
Standard inline doc tag name (value "@link").- Since:
- 3.30
- See Also:
-
TAG_LINKPLAIN
Standard inline doc tag name (value "@linkplain").- Since:
- 3.30
- See Also:
-
TAG_LITERAL
Standard inline doc tag name (value "@literal").Note that this tag first appeared in J2SE 5.
- Since:
- 3.30
- See Also:
-
TAG_PARAM
-
TAG_PROVIDES
Standard doc tag name (value "@provides").- Since:
- 3.30
- See Also:
-
TAG_RETURN
Standard doc tag name (value "@return").- Since:
- 3.30
- See Also:
-
TAG_SEE
-
TAG_SERIAL
Standard doc tag name (value "@serial").- Since:
- 3.30
- See Also:
-
TAG_SERIALDATA
Standard doc tag name (value "@serialData").- Since:
- 3.30
- See Also:
-
TAG_SERIALFIELD
Standard doc tag name (value "@serialField").- Since:
- 3.30
- See Also:
-
TAG_SINCE
-
TAG_SUMMARY
Standard doc tag name (value "@summary").- Since:
- 3.30
- See Also:
-
TAG_THROWS
Standard doc tag name (value "@throws").- Since:
- 3.30
- See Also:
-
TAG_USES
-
TAG_VALUE
Standard inline doc tag name (value "@value").- Since:
- 3.30
- See Also:
-
TAG_VERSION
Standard doc tag name (value "@version").- Since:
- 3.30
- See Also:
-
TAG_API_NOTE
-
TAG_IMPL_SPEC
Javadoc tag name (value "@implSpec").- Since:
- 3.30
- See Also:
-
TAG_IMPL_NOTE
Javadoc tag name (value "@implNote").- Since:
- 3.30
- See Also:
-
TAG_SNIPPET
Standard inline doc tag name (value "@snippet").- Since:
- 3.30
- See Also:
-
TAG_HIGHLIGHT
Standard snippet doc tag name (value "@highlight").- Since:
- 3.30
- See Also:
-
TAG_REPLACE
Standard snippet doc tag name (value "@replace").- Since:
- 3.30
- See Also:
-
-
Method Details
-
propertyDescriptors
Returns a list of structural property descriptors for this node type. Clients must not modify the result.- Parameters:
apiLevel- the API level; one of theAST.JLS*constants- Returns:
- a list of property descriptors (element type:
StructuralPropertyDescriptor) - Since:
- 3.0
-
tagProperties
Returns the live list of tag properties in this tag element.- Returns:
- the live list of properties in this tag element
(element type:
TagProperty) - Throws:
UnsupportedOperationException- if this operation is used less than JLS18- Since:
- 3.30
-
tagRegions
Returns the list of non dummy JavaDopRegions in this tag element.- Returns:
- the list of non dummy JavaDopRegions in this tag element.
(element type:
JavaDocRegion) - Throws:
UnsupportedOperationException- if this operation is used less than JLS18- Since:
- 3.30
-
tagRegionsContainingTextElement
Returns the list of non dummy JavaDocRegions containing this ASTNode and IDocElement.- Returns:
- the list of non dummy JavaDocRegions containing this ASTNode and IDocElement.
(element type:
JavaDocRegion) - Throws:
UnsupportedOperationException- if this operation is used less than JLS18- Since:
- 3.30
-
tagRegionsStartingAtTextElement
Returns the list of non dummy JavaDocRegions starting at this ASTNode and IDocElement.- Returns:
- the list of non dummy JavaDocRegions starting at this ASTNode and IDocElement.
(element type:
JavaDocRegion) - Throws:
UnsupportedOperationException- if this operation is used less than JLS18- Since:
- 3.30
-