Package org.eclipse.cdt.core.dom.rewrite
Enum ASTRewrite.CommentPosition
- java.lang.Object
-
- java.lang.Enum<ASTRewrite.CommentPosition>
-
- org.eclipse.cdt.core.dom.rewrite.ASTRewrite.CommentPosition
-
- All Implemented Interfaces:
Serializable
,Comparable<ASTRewrite.CommentPosition>
- Enclosing class:
- ASTRewrite
public static enum ASTRewrite.CommentPosition extends Enum<ASTRewrite.CommentPosition>
Defines the positions of the comment.- Since:
- 5.3
-
-
Enum Constant Summary
Enum Constants Enum Constant Description freestanding
Comments before a closing brace such as they occur in namespace-, class- and method-definitions or at the end of a fileleading
Comments before a statement, declaration, or definitiontrailing
Comments right after the AST node on the same line
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ASTRewrite.CommentPosition
valueOf(String name)
Returns the enum constant of this type with the specified name.static ASTRewrite.CommentPosition[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
leading
public static final ASTRewrite.CommentPosition leading
Comments before a statement, declaration, or definition
-
trailing
public static final ASTRewrite.CommentPosition trailing
Comments right after the AST node on the same line
-
freestanding
public static final ASTRewrite.CommentPosition freestanding
Comments before a closing brace such as they occur in namespace-, class- and method-definitions or at the end of a file
-
-
Method Detail
-
values
public static ASTRewrite.CommentPosition[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ASTRewrite.CommentPosition c : ASTRewrite.CommentPosition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ASTRewrite.CommentPosition valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-