public class Argument extends ASTNode
byteOffset, line, nodeID, symbolTable
Constructor and Description |
---|
Argument(Type t,
String n)
Initializing constructor.
|
Argument(Type t,
String n,
boolean f)
Initializing constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a new object with the same primitive data, and recursively creates new member data
objects as well.
|
boolean |
equals(Object o)
Two
Argument s are equivalent when their names and types are equivalent. |
boolean |
getFinal()
Retrieves the value of the
isFinal member variable. |
String |
getName()
Retrieves the name portion of the argument.
|
Type |
getType()
Retrieves the type portion of the argument.
|
int |
hashCode()
The hash code of an
Argument is simply the hash code of its name. |
ASTNodeIterator |
iterator()
Returns an iterator used to successively access the children of this node.
|
void |
runPass(Pass pass)
Ensures that the correct
run() method is called for this type of node. |
void |
write(StringBuffer buffer)
Writes a string representation of this
ASTNode to the specified buffer. |
public Argument(Type t, String n)
t
- Reference to the object representing the argument's type.n
- Reference to the object representing the argument's name.public Argument(Type t, String n, boolean f)
t
- Reference to the object representing the argument's type.n
- Reference to the object representing the argument's name.f
- Whether or not the argument was modified as final.public boolean getFinal()
isFinal
member variable.isFinal
.public Type getType()
type
.public String getName()
name
.public int hashCode()
Argument
is simply the hash code of its name.public boolean equals(Object o)
Argument
s are equivalent when their names and types are equivalent.public ASTNodeIterator iterator()
public Object clone()
public void runPass(Pass pass)
run()
method is called for this type of node.public void write(StringBuffer buffer)
ASTNode
to the specified buffer. The
representation written is parsable by the LBJava compiler, but not very readable.Copyright © 2016. All rights reserved.