com.togethersoft.sca.ast
Interface AstComment
- All Superinterfaces:
- AstObject
- public interface AstComment
- extends AstObject
Represents a comment in the source code. For example:
if (list != null) {
// This is a single-line comment
...
}
/** This is a Javadoc comment. */
public IParameter createParameter();
| Fields inherited from interface com.togethersoft.sca.ast.AstObject |
ARRAY_CREATION, ARRAY_INITIALIZER, ARRAY_REFERENCE, ASSERT_STATEMENT, ASSIGNMENT_EXPRESSION, BINARY_EXPRESSION, BREAK_STATEMENT, CASE_LABEL, CAST_EXPRESSION, CATCH_CLAUSE, CLASS_FILE, COMMENT, COMPILATION_UNIT, COMPOUND_STATEMENT, CONDITIONAL_EXPRESSION, CONSTRUCTOR_INVOCATION, CONTINUE_STATEMENT, DBC_RESULT, DECLARATION_STATEMENT, DO_STATEMENT, EMPTY_STATEMENT, EXPRESSION_STATEMENT, FIELD_REFERENCE, FINALLY_CLAUSE, FOR_STATEMENT, IF_STATEMENT, IMPORT, INITIALIZER, JAVADOC_TAG, LITERAL, METHOD, METHOD_CALL_EXPRESSION, N_A, OBJECT_CREATION_EXPRESSION, PACKAGE, PARENTHESIZED_EXPRESSION, RETURN_STATEMENT, SIMPLE_REFERENCE, SUPER_EXPRESSION, SWITCH_GROUP, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, THIS_EXPRESSION, THROW_SPECIFIER, THROW_STATEMENT, TRY_STATEMENT, TYPE, TYPE_EXPRESSION, UNARY_EXPRESSION, VARIABLE, VARIABLE_DECLARATION, WHILE_STATEMENT |
|
Method Summary |
java.lang.String |
getComment()
Returns this comment's contents. |
AstJavadocTag[] |
getJavadocTags()
Returns a list of Javadoc tags contained in this comment. |
boolean |
isJavadoc()
Indicates whether this is a Javadoc comment (starting with /**). |
boolean |
isSingleLine()
Indicates whether this is a single-line comment (starting with //). |
| Methods inherited from interface com.togethersoft.sca.ast.AstObject |
addComment, getChildren, getComments, getCompilationUnit, getDeclaringMethod, getDeclaringType, getObjectKind, getPackage, getParent, getPosition, isDeleted, remove, replaceWith, replaceWith, setPosition, setPositionAfter, visitExpressions, visitStatements |
getComment
public java.lang.String getComment()
- Returns this comment's contents. Comment starting and ending characters
(
//, /*, */) are included. End-of-line character is
not included for single-line comments.
getJavadocTags
public AstJavadocTag[] getJavadocTags()
- Returns a list of Javadoc tags contained in this comment. Returns an
empty list if this comment does not contain Javadoc tags, or is not a
Javadoc comment.
- Returns:
- a list of Javadoc tags.
isJavadoc
public boolean isJavadoc()
- Indicates whether this is a Javadoc comment (starting with
/**).
isSingleLine
public boolean isSingleLine()
- Indicates whether this is a single-line comment (starting with
//).