Package org.eclipse.cdt.core.dom.rewrite

# Enum Class 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>`, `java.lang.constant.Constable`

Enclosing class:
  `ASTRewrite`

public static enum ASTRewrite.CommentPosition extends Enum<ASTRewrite.CommentPosition>
Defines the positions of the comment.

Since:
  5.3

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## 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 file
`leading`
Comments before a statement, declaration, or definition
`trailing`
Comments right after the AST node on the same line

## Method Summary

Modifier and Type
Method
Description
`static ASTRewrite.CommentPosition`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static ASTRewrite.CommentPosition[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

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

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

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

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

## Enum Constant Details

### 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 Details

### values

public static ASTRewrite.CommentPosition[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static ASTRewrite.CommentPosition valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
  `NullPointerException` - if the argument is null