## org.eclipse.emf.codegen.merge.java.facade.ast
Class ASTJAnnotation

    java.lang.Object
      org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
          org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode<org.eclipse.jdt.core.dom.Annotation>
              org.eclipse.emf.codegen.merge.java.facade.ast.ASTJAnnotation

All Implemented Interfaces:
  JAnnotation, JNode

    public class ASTJAnnotation

extends ASTJNode<org.eclipse.jdt.core.dom.Annotation>
implements JAnnotation

Wraps `Annotation` object. ASTJAnnotation nodes are children of `ASTJMember`.

Field Summary
`protected java.lang.String` `contents` Cached contents of this annotation

Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode
`isCommentedOut, name, rewriter, UNITIALIZED_STRING`

Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
`EMPTY_STRING_ARRAY, qualifiedName`

Constructor Summary
`protected` `ASTJAnnotation(org.eclipse.jdt.core.dom.Annotation annotation)`

Method Summary
`void` `dispose()`
`java.lang.String` `getContents()` Get the original contents of the node using the source.
`java.lang.String` `getName()` Returns name of annotation type with preceding @ sign.
`protected org.eclipse.jdt.core.dom.Annotation` `getRewrittenASTNode()`
`void` `setContents(java.lang.String contents)` Overwrites the contents of the annotation with the given contents.
`void` `setName(java.lang.String name)` Sets the name of annotation type.
`protected void` `setRewrittenASTNode(org.eclipse.jdt.core.dom.Annotation rewrittenAnnotation)`

Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode

`addChild, addValueToListProperty, addValueToListProperty, ancestorInserted, ancestorToBeRemoved, childToBeChanged, combineArrayAndList, commentOut, convertASTNodeListToStringArray, disableTrackAndReplace, enableTrackAndReplace, getASTNode, getFacadeHelper, getParent, getRemovedASTNode, getRewriter, getWrappedObject, insert, insertFirst, insertLast, insertSibling, isDisposed, nodeToBeMoved, nodeToBeRemoved, remove, remove, removeNodeFromListProperty, removeTrackAndReplace, setASTNode, setFacadeHelper, setFlags, setListNodeProperty, setNodeProperty, setNodeProperty, setParent, setRemovedASTNode, setRewriter, setTrackedNodeProperty, setWrappedObject, trackAndReplace`

Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
`computeQualifiedName, computeQualifiedName, computeQualifiedName, computeQualifiedName, getChildren, getFlags, getName, getQualifiedName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.emf.codegen.merge.java.facade.JNode
`getChildren, getFlags, getParent, getQualifiedName, setFlags`

Field Detail

### contents

    protected java.lang.String contents

  Cached contents of this annotation

  See Also:
    `getContents()`, `setContents(String)`

Constructor Detail

### ASTJAnnotation

    protected ASTJAnnotation(org.eclipse.jdt.core.dom.Annotation annotation)

Parameters:
  `annotation` -

Method Detail

### dispose

    public void dispose()

  Overrides:
    `dispose` in class `ASTJNode<org.eclipse.jdt.core.dom.Annotation>`

### getRewrittenASTNode

    protected org.eclipse.jdt.core.dom.Annotation getRewrittenASTNode()

  Returns:
    the rewritten annotation

### setRewrittenASTNode

    protected void setRewrittenASTNode(org.eclipse.jdt.core.dom.Annotation rewrittenAnnotation)

  Parameters:
    `rewrittenAnnotation` - the annotation to use in set methods

### getName

    public java.lang.String getName()

  Returns name of annotation type with preceding @ sign.

  Specified by:
    `getName` in interface `JNode`
  Returns:
    the name, or `null` if it has no name
  See Also:
    `JNode.getName()`

### setName

    public void setName(java.lang.String name)

  Sets the name of annotation type. If the name starts with @ sign, @ sign is removed.

  Specified by:
    `setName` in interface `JNode`
  Parameters:
    `name` - name to set
  See Also:
    `JNode.setName(java.lang.String)`

### getContents

    public java.lang.String getContents()

  Description copied from class: `ASTJNode`
  Get the original contents of the node using the source.

  The contents of the node in AST implementation includes only the node itself without the leading or trailing whitespace. If the node has a Javadoc comment, it is included in the contents. No other leading or trailing comments are included in the node contents.

  Note that this method returns the contents before any modifications. This method will not return the correct contents if the node has been cloned, removed or moved.

  Specified by:
    `getContents` in interface `JNode`
  Overrides:
    `getContents` in class `ASTJNode<org.eclipse.jdt.core.dom.Annotation>`
  Returns:
    the contents, or `null` if this node has no contents
  See Also:
    `JNode.getContents()`

### setContents

    public void setContents(java.lang.String contents)

  Description copied from interface: `JAnnotation`
  Overwrites the contents of the annotation with the given contents.

  Specified by:
    `setContents` in interface `JAnnotation`

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.