koala.dynamicjava.tree
Class FieldDeclaration

java.lang.Object
  extended bykoala.dynamicjava.tree.Node
      extended bykoala.dynamicjava.tree.FieldDeclaration

public class FieldDeclaration
extends Node

This class represents field declarations in an AST


Field Summary
static java.lang.String ACCESS_FLAGS
          The accessFlags property name
static java.lang.String INITIALIZER
          The initializer property name
static java.lang.String NAME
          The name property name
static java.lang.String TYPE
          The type property name
 
Fields inherited from class koala.dynamicjava.tree.Node
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE, FILENAME
 
Constructor Summary
FieldDeclaration(int flags, Type type, java.lang.String name, Expression init)
          Creates a new field declaration
FieldDeclaration(int flags, Type type, java.lang.String name, Expression init, java.lang.String fn, int bl, int bc, int el, int ec)
          Creates a new field declaration
 
Method Summary
 java.lang.Object acceptVisitor(Visitor visitor)
          Allows a visitor to traverse the tree
 int getAccessFlags()
          Returns the access flags for this method
 Expression getInitializer()
          Returns the initializer for this field
 java.lang.String getName()
          Returns the name of this field
 Type getType()
          Gets the declared type for this field
 void setAccessFlags(int f)
          Sets the access flags for this constructor
 void setInitializer(Expression e)
          Sets the initializer
 void setName(java.lang.String s)
          Sets the field's name
 void setType(Type t)
          Sets the type of this field
 
Methods inherited from class koala.dynamicjava.tree.Node
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getFilename, getProperties, getProperty, hasProperty, removePropertyChangeListener, removePropertyChangeListener, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setFilename, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_FLAGS

public static final java.lang.String ACCESS_FLAGS
The accessFlags property name

See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
The type property name

See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
The name property name

See Also:
Constant Field Values

INITIALIZER

public static final java.lang.String INITIALIZER
The initializer property name

See Also:
Constant Field Values
Constructor Detail

FieldDeclaration

public FieldDeclaration(int flags,
                        Type type,
                        java.lang.String name,
                        Expression init)
Creates a new field declaration

Parameters:
flags - the access flags
type - the type of this field
name - the name of this field
init - the initializer. Can be null
Throws:
java.lang.IllegalArgumentException - if name is null or type is null

FieldDeclaration

public FieldDeclaration(int flags,
                        Type type,
                        java.lang.String name,
                        Expression init,
                        java.lang.String fn,
                        int bl,
                        int bc,
                        int el,
                        int ec)
Creates a new field declaration

Parameters:
flags - the access flags
type - the type of this field
name - the name of this field
init - the initializer. Can be null
fn - the filename
bl - the begin line
bc - the begin column
el - the end line
ec - the end column
Throws:
java.lang.IllegalArgumentException - if name is null or type is null
Method Detail

getAccessFlags

public int getAccessFlags()
Returns the access flags for this method


setAccessFlags

public void setAccessFlags(int f)
Sets the access flags for this constructor


getType

public Type getType()
Gets the declared type for this field


setType

public void setType(Type t)
Sets the type of this field

Throws:
java.lang.IllegalArgumentException - if t is null

getName

public java.lang.String getName()
Returns the name of this field


setName

public void setName(java.lang.String s)
Sets the field's name

Throws:
java.lang.IllegalArgumentException - if s is null

getInitializer

public Expression getInitializer()
Returns the initializer for this field


setInitializer

public void setInitializer(Expression e)
Sets the initializer


acceptVisitor

public java.lang.Object acceptVisitor(Visitor visitor)
Allows a visitor to traverse the tree

Specified by:
acceptVisitor in class Node
Parameters:
visitor - the visitor to accept


Copyright © 2001 Stephane Hillion. All Rights Reserved.