openjava.ptree
Class ModifierList

java.lang.Object
  |
  +--openjava.ptree.ParseTreeObject
        |
        +--openjava.ptree.List
              |
              +--openjava.ptree.ModifierList
All Implemented Interfaces:
java.lang.Cloneable, ParseTree

public class ModifierList
extends List

The ModifierList class presents for the node of parse tree of qualified name.


Field Summary
static int ABSTRACT
           
static int EMPTY
           
static int FINAL
           
static int NATIVE
           
static int PRIVATE
           
static int PROTECTED
           
static int PUBLIC
           
static int STATIC
           
static int SYNCHRONIZED
           
static int TRANSIENT
           
static int VOLATILE
           
 
Fields inherited from class openjava.ptree.ParseTreeObject
debugFlag, debugLevel, LN, out, writerStack
 
Constructor Summary
ModifierList()
           
ModifierList(int mod)
           
ModifierList(java.lang.String e0)
           
 
Method Summary
 void accept(ParseTreeVisitor v)
          Accepts a ParseTreeVisitor object as the role of a Visitor in the Visitor pattern, as the role of an Element in the Visitor pattern. This invoke an appropriate visit() method on the accepted visitor.
 void add(int mod)
          Adds the specified element after the list This causes side-effect.
 void add(java.lang.String p)
          Adds the specified element after the list This causes side-effect.
 void append(ModifierList lst)
          Appends a list after this list.
 boolean contains(int mod)
           
 boolean contains(java.lang.String str)
          Tests if any element representing the specified string is exist or not.
 java.lang.String get(int n)
          Gets the specified element at
 int getRegular()
           
 void insertElementAt(java.lang.String p, int n)
          Inserts the specified element into the list before the specified element of the list.
 boolean isEmpty()
          Tests if this list is empty.
 boolean isEmptyAsRegular()
           
 java.lang.String remove(int n)
          Removes an element at the specified point from this list
 void set(int n, java.lang.String p)
          Sets the specified element at the specified place of the list
 java.lang.String toString()
          Generates string which presents for this parse-tree
static java.lang.String toString(int mod)
          Return a string describing the access modifier flags in the specified modifier.
 void writeCode()
          Writes the code this parse-tree presents for.
 
Methods inherited from class openjava.ptree.List
childrenAccept, contents_addElement, contents_elementAt, contents_insertElementAt, contents_removeElementAt, contents_setElementAt, contents_size, elements, equals, makeRecursiveCopy, removeAll, replaceChildWith, size
 
Methods inherited from class openjava.ptree.ParseTreeObject
clone, eq, eq, equal, flushPrintWriter, getDebugFlag, getNest, getObjectID, getParent, getPrintWriter, getTab, hashCode, lastObjectID, makeCopy, popNest, popPrintWriter, pushNest, pushPrintWriter, replace, setDebugFlag, setDebugLevel, setNest, setParent, setPrintStream, setTab, toFlattenString, writeDebug, writeDebugL, writeDebugLln, writeDebugln, writeDebugLR, writeDebugR, writeDebugRln, writeTab
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface openjava.ptree.ParseTree
eq, getObjectID, makeCopy, replace, toFlattenString
 

Field Detail

PUBLIC

public static final int PUBLIC

PROTECTED

public static final int PROTECTED

PRIVATE

public static final int PRIVATE

STATIC

public static final int STATIC

FINAL

public static final int FINAL

SYNCHRONIZED

public static final int SYNCHRONIZED

VOLATILE

public static final int VOLATILE

TRANSIENT

public static final int TRANSIENT

NATIVE

public static final int NATIVE

ABSTRACT

public static final int ABSTRACT

EMPTY

public static final int EMPTY
Constructor Detail

ModifierList

public ModifierList()

ModifierList

public ModifierList(java.lang.String e0)

ModifierList

public ModifierList(int mod)
Method Detail

writeCode

public void writeCode()
Description copied from class: List
Writes the code this parse-tree presents for.
Overrides:
writeCode in class List

toString

public java.lang.String toString()
Description copied from interface: ParseTree
Generates string which presents for this parse-tree
Overrides:
toString in class ParseTreeObject
Following copied from interface: openjava.ptree.ParseTree
Returns:
string which presents for this parse-tree

toString

public static java.lang.String toString(int mod)
Return a string describing the access modifier flags in the specified modifier. For example:
    public final synchronized
    private transient volatile
 
The modifier names are return in canonical order, as specified by The Java Language Specification.

isEmpty

public boolean isEmpty()
Description copied from class: List
Tests if this list is empty.
Overrides:
isEmpty in class List
Following copied from class: openjava.ptree.List
Returns:
true if this list is empty

isEmptyAsRegular

public boolean isEmptyAsRegular()

contains

public boolean contains(java.lang.String str)
Description copied from class: List
Tests if any element representing the specified string is exist or not.
Overrides:
contains in class List
Following copied from class: openjava.ptree.List
Parameters:
str - a string to test.
Returns:
true if any element representing the specified string is exist.

contains

public boolean contains(int mod)

get

public java.lang.String get(int n)
Gets the specified element at
Parameters:
n -  

set

public void set(int n,
                java.lang.String p)
Sets the specified element at the specified place of the list
Parameters:
p - element
n - the number where to set element

add

public void add(int mod)
Adds the specified element after the list This causes side-effect.
Parameters:
p - a modifier to be inserted into the list

add

public void add(java.lang.String p)
Adds the specified element after the list This causes side-effect.
Parameters:
p - a modifier to be inserted into the list

remove

public java.lang.String remove(int n)
Removes an element at the specified point from this list
Parameters:
n - where to remove element.

insertElementAt

public void insertElementAt(java.lang.String p,
                            int n)
Inserts the specified element into the list before the specified element of the list. This causes side-effect.
Parameters:
p - the element to be inserted into the list
n - number of the element before which insertion ocuurs

append

public void append(ModifierList lst)
Appends a list after this list.
Parameters:
lst - a list to be appended

getRegular

public int getRegular()

accept

public void accept(ParseTreeVisitor v)
            throws ParseTreeException
Description copied from interface: ParseTree
Accepts a ParseTreeVisitor object as the role of a Visitor in the Visitor pattern, as the role of an Element in the Visitor pattern.

This invoke an appropriate visit() method on the accepted visitor.

Overrides:
accept in class ParseTreeObject
Following copied from interface: openjava.ptree.ParseTree
Parameters:
visitor - a visitor