All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.Parameter
java.lang.Object
|
+----openjava.ptree.PtreeObject
|
+----openjava.ptree.NonLeaf
|
+----openjava.ptree.Parameter
- 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.
- See Also:
- Ptree, NonLeaf, ModifierList, TypeSpecifier, Identifier
-
Parameter(ModifierList, TypeSpecifier, Identifier)
- Allocates a new object.
-
Parameter(TypeSpecifier, Identifier)
- Allocates a new object.
-
getModifiers()
- Gets the modifiers of this parameter.
-
getTypeSpecifier()
- Gets the type specifier of this parameter.
-
getVariable()
- Gets the variable name of this parameter.
-
setModifiers(ModifierList)
- Sets the modifiers of this parameter.
-
setTypeSpecifier(TypeSpecifier)
- Sets the type specifier of this parameter.
-
setVariable(Identifier)
- Sets the variable name of this parameter.
-
writeCode()
- Writes the code this parse-tree presents for.
Parameter
public Parameter(ModifierList modiflist,
TypeSpecifier typespec,
Identifier declname)
- Allocates a new object.
- Parameters:
- modfiers - modifier list of the new parameter
- typespec - type specifier includes array dimension info
- declname - the parameter's name, including no array dim.
Parameter
public Parameter(TypeSpecifier typespec,
Identifier declname)
- Allocates a new object.
- Parameters:
- typespec - type specifier includes array dimension info
- declname - the parameter's name, also includes array dim
arg modfier is null means parameter has no modifier
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class NonLeaf
getModifiers
public ModifierList getModifiers()
- Gets the modifiers of this parameter.
- Returns:
- the modfiers.
setModifiers
public void setModifiers(ModifierList modifs)
- Sets the modifiers of this parameter.
- Parameters:
- modifs - the modfiers to set.
getTypeSpecifier
public TypeSpecifier getTypeSpecifier()
- Gets the type specifier of this parameter.
- Returns:
- the type specifier.
setTypeSpecifier
public void setTypeSpecifier(TypeSpecifier tspec)
- Sets the type specifier of this parameter.
- Parameters:
- tspec - the type specifier to set.
getVariable
public Identifier getVariable()
- Gets the variable name of this parameter.
- Returns:
- the variable name.
setVariable
public void setVariable(Identifier varname)
- Sets the variable name of this parameter.
- Parameters:
- varname - the variable name to set.
All Packages Class Hierarchy This Package Previous Next Index