java.lang.Object
openjava.ptree.ParseTreeObject
openjava.ptree.NonLeaf
openjava.ptree.Parameter
- All Implemented Interfaces:
- java.lang.Cloneable, ParseTree
- public class Parameter
- extends NonLeaf
The Parameter class represents parameter node of parse tree.
Modifiers of parameter are supported from JDK 1.1.
The code like:
void test( final int i ){
....
}
is allowed from JDK 1.1.
| Fields inherited from class openjava.ptree.NonLeaf |
|
| Methods inherited from class openjava.ptree.NonLeaf |
childrenAccept, elementAt, equals, getComment, getContents, getLength, makeRecursiveCopy, replaceChildWith, set, set, set, set, set, set, set, set, set, setComment, setElementAt |
| Methods inherited from class openjava.ptree.ParseTreeObject |
clone, equal, getObjectID, getParent, hashCode, lastObjectID, makeCopy, replace, setParent, toFlattenString, toString |
Parameter
public Parameter(ModifierList modiflist,
TypeName type_specifier,
java.lang.String declname)
- Allocates a new object.
Parameter
public Parameter(TypeName type_specifier,
java.lang.String declname)
- Allocates a new object.
getModifiers
public ModifierList getModifiers()
- Gets the modifiers of this parameter.
setModifiers
public void setModifiers(ModifierList modifs)
- Sets the modifiers of this parameter.
getTypeSpecifier
public TypeName getTypeSpecifier()
- Gets the type specifier of this parameter.
setTypeSpecifier
public void setTypeSpecifier(TypeName tspec)
- Sets the type specifier of this parameter.
getVariable
public java.lang.String getVariable()
- Gets the variable name of this parameter.
setVariable
public void setVariable(java.lang.String varname)
- Sets the variable name of this parameter.
accept
public void accept(openjava.ptree.util.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.
- Specified by:
accept in interface ParseTree- Specified by:
accept in class ParseTreeObject