Language Processing
v2.0

pj2
Class Parser.Type

Object
  extended by AbstractCollection<E>
      extended by AbstractList<Parser.Node>
          extended by Parser.Node
              extended by Parser.Type
All Implemented Interfaces:
Iterable<Parser.Node>, Collection<Parser.Node>, List<Parser.Node>
Enclosing class:
Parser

public class Parser.Type
extends Parser.Node

represents type information.


Field Summary
 boolean flatten
          true if factory method can squeeze this rule out in favor of a single descendant.
protected  String[] interfaces
          interface names.
 String name
          empty string, class name (or void).
 
Fields inherited from class Parser.Node
position
 
Fields inherited from class AbstractList
modCount
 
Constructor Summary
protected Parser.Type(int position, String name, boolean flatten, String... interfaces)
          assumed not null, but may be empty.
 
Method Summary
 String getInterfaces()
          returns empty string or comma-preceded list of names.
 boolean isPlain()
          true if type is just a name without interfaces or options.
 String toString()
           
 void visit(Visitor visitor)
          implements divide and conquer for Visitor.
 
Methods inherited from class Parser.Node
get, size
 
Methods inherited from class AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

name

public final String name
empty string, class name (or void).


interfaces

protected final String[] interfaces
interface names.


flatten

public final boolean flatten
true if factory method can squeeze this rule out in favor of a single descendant.

Constructor Detail

Parser.Type

protected Parser.Type(int position,
                      String name,
                      boolean flatten,
                      String... interfaces)
assumed not null, but may be empty.

Method Detail

getInterfaces

public String getInterfaces()
returns empty string or comma-preceded list of names.


isPlain

public boolean isPlain()
true if type is just a name without interfaces or options.


visit

public void visit(Visitor visitor)
Description copied from class: Parser.Node
implements divide and conquer for Visitor. Body must be visitor.visit(this);.

Specified by:
visit in class Parser.Node

toString

public String toString()
Overrides:
toString in class AbstractCollection<Parser.Node>


(c) 2008 Axel T. Schreiner