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 and Description
`freestanding` Comments before a closing brace such as they occur in namespace-, class- and method-definitions or at the end of a file
`leading` Comments before a statement, declaration, or definition
`trailing` Comments right after the AST node on the same line

### Method Summary

All Methods Static Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### 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 name
  `NullPointerException` - if the argument is null