public class Name extends Expression
Modifier and Type | Field and Description |
---|---|
int |
dimensions
The number of matched brackets appearing after a single identifier; supports variable
declarations.
|
String[] |
name
(¬ø) These strings appeared with dots between them to form the name in the source.
|
parenthesized, typeCache, typeCacheFilled
byteOffset, line, nodeID, symbolTable
Modifier | Constructor and Description |
---|---|
|
Name(Name n,
TokenValue token)
Parser's constructor.
|
|
Name(String n)
Takes a fully specified name (eg java.lang.String) as input.
|
protected |
Name(String[] n)
Should only be called by the
clone() method. |
protected |
Name(String[] n,
int line,
int byteOffset)
Should only be called by the
clone() method. |
|
Name(String n,
int line,
int byteOffset)
Takes a fully specified name (eg java.lang.String) as input.
|
|
Name(TokenValue token)
Parser's 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 |
containsQuantifiedVariable()
Determines if there are any quantified variables in this expression.
|
boolean |
containsQuantifiedVariable(boolean b)
Determines if there are any quantified variables in this expression.
|
Name |
cutLast()
Returns a new
Name object that is the same as this Name object,
except the last identifier has been removed. |
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
HashSet |
getVariableTypes()
Returns a set of
Argument s storing the name and type of each variable that is a
subexpression of this expression. |
HashSet |
getVariableTypes(boolean b)
Returns a set of
Argument s storing the name and type of each variable that is a
subexpression of this expression. |
int |
hashCode()
Returns a hash code value for java hash structures.
|
ASTNodeIterator |
iterator()
Returns an iterator used to successively access the children of this node.
|
int |
length()
Returns the length of the
name array. |
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. |
senseValueChild
public String[] name
public int dimensions
public Name(String n)
n
- A fully specified name.public Name(String n, int line, int byteOffset)
n
- A fully specified name.protected Name(String[] n)
clone()
method.n
- The value of the name
variable.protected Name(String[] n, int line, int byteOffset)
clone()
method.n
- The value of the name
variable.public Name(TokenValue token)
token
- The parser's token for the identifier.public Name(Name n, TokenValue token)
n
- A name that needs another identifier added to it.token
- The parser's token for the identifier.public int length()
name
array.name
array.public Name cutLast()
Name
object that is the same as this Name
object,
except the last identifier has been removed.public HashSet getVariableTypes()
Argument
s storing the name and type of each variable that is a
subexpression of this expression. This method cannot be run before
SemanticAnalysis
runs.getVariableTypes
in class Expression
public HashSet getVariableTypes(boolean b)
Argument
s storing the name and type of each variable that is a
subexpression of this expression. This method cannot be run before
SemanticAnalysis
runs.b
- Flag set if this name is the name of an invoked method.public boolean containsQuantifiedVariable()
SemanticAnalysis
runs.containsQuantifiedVariable
in class Expression
public boolean containsQuantifiedVariable(boolean b)
SemanticAnalysis
runs.b
- Flag set if this name is the name of an invoked method.public int hashCode()
public boolean equals(Object o)
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.