Groovy 1.7.0

## org.codehaus.groovy.ast
Class AnnotatedNode

    java.lang.Object
      org.codehaus.groovy.ast.ASTNode
          org.codehaus.groovy.ast.AnnotatedNode

    class AnnotatedNode
    extends ASTNode

Base class for any AST node which is capable of being annotated

author:
  James Strachan

version:
  $Revision: 15807 $

Field Summary
`ClassNode` | `declaringClass`

Constructor Summary
`AnnotatedNode()`

Method Summary
`void` | `addAnnotation(AnnotationNode value)`
`void` | `addAnnotations(List annotations)`
`List` | `getAnnotations()`
`List` | `getAnnotations(ClassNode type)`
`ClassNode` | `getDeclaringClass()`
`boolean` | `isSynthetic()` returns true if this node is added by the compiler.
`void` | `setDeclaringClass(ClassNode declaringClass)`
`void` | `setSynthetic(boolean synthetic)` sets this node as a node added by the compiler.

Methods inherited from class ASTNode
getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition, visit

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### declaringClass

    ClassNode declaringClass

Constructor Detail

### AnnotatedNode

    public AnnotatedNode()

Method Detail

### addAnnotation

    public void addAnnotation(AnnotationNode value)

### addAnnotations

    public void addAnnotations(List annotations)

### getAnnotations

    public List getAnnotations()

### getAnnotations

    public List getAnnotations(ClassNode type)

### getDeclaringClass

    public ClassNode getDeclaringClass()

### isSynthetic

    public boolean isSynthetic()

  returns true if this node is added by the compiler. NOTE: This method has nothing to do with the synthetic flag for fields, methods or classes.
  return:
    true if this node is added by the compiler

### setDeclaringClass

    public void setDeclaringClass(ClassNode declaringClass)

  param:
    declaringClass - The declaringClass to set.

### setSynthetic

    public void setSynthetic(boolean synthetic)

  sets this node as a node added by the compiler. NOTE: This method has nothing to do with the synthetic flag for fields, methods or classes.
  param:
    synthetic - if true this node is marked as added by the compiler

Copyright © 2003-2009 The Codehaus. All rights reserved.