koala.dynamicjava.tree
Class ArrayType

java.lang.Object
  extended bykoala.dynamicjava.tree.Node
      extended bykoala.dynamicjava.tree.Type
          extended bykoala.dynamicjava.tree.ArrayType

public class ArrayType
extends Type

This class represents the array type nodes of the syntax tree


Field Summary
static java.lang.String ELEMENT_TYPE
          The elementType property name
 
Fields inherited from class koala.dynamicjava.tree.Node
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE, FILENAME
 
Constructor Summary
ArrayType(Type et, int dim)
          Initializes the type
ArrayType(Type et, int dim, java.lang.String fn, int bl, int bc, int el, int ec)
          Initializes the type
 
Method Summary
 java.lang.Object acceptVisitor(Visitor visitor)
          Allows a visitor to traverse the tree
 Type getElementType()
          Returns the type of the elements of the arrays represented by this type
 void setElementType(Type t)
          Sets the type of the elements of the arrays represented by this type
 
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

ELEMENT_TYPE

public static final java.lang.String ELEMENT_TYPE
The elementType property name

See Also:
Constant Field Values
Constructor Detail

ArrayType

public ArrayType(Type et,
                 int dim)
Initializes the type

Parameters:
et - the element type
dim - the dimension of the arrays represented by this type (> 0)
Throws:
java.lang.IllegalArgumentException - if et is null or dim < 1

ArrayType

public ArrayType(Type et,
                 int dim,
                 java.lang.String fn,
                 int bl,
                 int bc,
                 int el,
                 int ec)
Initializes the type

Parameters:
et - the element type
dim - the dimension of the arrays represented by this type (> 0)
fn - the filename
bl - the begin line
bc - the begin column
el - the end line
ec - the end column
Throws:
java.lang.IllegalArgumentException - if et is null or dim < 1
Method Detail

getElementType

public Type getElementType()
Returns the type of the elements of the arrays represented by this type


setElementType

public void setElementType(Type t)
Sets the type of the elements of the arrays represented by this type

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

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.