|
|||||||||
| Home >> All >> [ bsh overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
bsh
Class BSHClassDeclaration

java.lang.Objectbsh.SimpleNode
bsh.BSHClassDeclaration
- All Implemented Interfaces:
- Node, java.io.Serializable
- class BSHClassDeclaration
- extends SimpleNode
| Field Summary | |
protected Node[] |
children
|
(package private) static java.lang.String |
CLASSINITNAME
The class instance initializer method name. |
(package private) boolean |
extend
|
(package private) Token |
firstToken
|
protected int |
id
|
(package private) java.lang.Class[] |
interfaces
|
static SimpleNode |
JAVACODE
|
(package private) Token |
lastToken
|
(package private) Modifiers |
modifiers
|
(package private) java.lang.String |
name
|
(package private) int |
numInterfaces
|
protected Node |
parent
|
(package private) java.lang.String |
sourceFile
the source of the text from which this was parsed |
| Constructor Summary | |
(package private) |
BSHClassDeclaration(int id)
|
| Method Summary | |
void |
dump(java.lang.String prefix)
|
java.lang.Object |
eval(CallStack callstack,
Interpreter interpreter)
This is the general signature for evaluation of a node. |
SimpleNode |
getChild(int i)
|
int |
getLineNumber()
Get the line number of the starting token |
java.lang.String |
getSourceFile()
Get the name of the source file (or more generally source) of the text from which this node was parsed. |
java.lang.String |
getText()
Get the text of the tokens comprising this node. |
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's list of children. |
void |
jjtClose()
This method is called after all the child nodes have been added. |
Node |
jjtGetChild(int i)
This method returns a child node. |
int |
jjtGetNumChildren()
Return the number of children the node has. |
Node |
jjtGetParent()
|
void |
jjtOpen()
This method is called after the node has been made the current node. |
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent. |
void |
prune()
Detach this node from its parent. |
void |
setSourceFile(java.lang.String sourceFile)
Set the name of the source file (or more generally source) of the text from which this node was parsed. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
java.lang.String |
toString(java.lang.String prefix)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
CLASSINITNAME
static final java.lang.String CLASSINITNAME
- The class instance initializer method name.
A BshMethod by this name is installed by the class delcaration into
the scripted class and it is called to initialize instances of the
class.
- See Also:
- Constant Field Values
name
java.lang.String name
modifiers
Modifiers modifiers
numInterfaces
int numInterfaces
interfaces
java.lang.Class[] interfaces
extend
boolean extend
JAVACODE
public static SimpleNode JAVACODE
parent
protected Node parent
children
protected Node[] children
id
protected int id
firstToken
Token firstToken
lastToken
Token lastToken
sourceFile
java.lang.String sourceFile
- the source of the text from which this was parsed
| Constructor Detail |
BSHClassDeclaration
BSHClassDeclaration(int id)
| Method Detail |
eval
public java.lang.Object eval(CallStack callstack, Interpreter interpreter) throws EvalError
- Description copied from class:
SimpleNode - This is the general signature for evaluation of a node.
- Overrides:
evalin classSimpleNode
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).- Overrides:
toStringin classSimpleNode
jjtOpen
public void jjtOpen()
- Description copied from interface:
Node - This method is called after the node has been made the current
node. It indicates that child nodes can now be added to it.
jjtClose
public void jjtClose()
- Description copied from interface:
Node - This method is called after all the child nodes have been
added.
jjtSetParent
public void jjtSetParent(Node n)
- Description copied from interface:
Node - This pair of methods are used to inform the node of its
parent.
- Specified by:
jjtSetParentin interfaceNode
jjtGetParent
public Node jjtGetParent()
- Specified by:
jjtGetParentin interfaceNode
jjtAddChild
public void jjtAddChild(Node n, int i)
- Description copied from interface:
Node - This method tells the node to add its argument to the node's
list of children.
- Specified by:
jjtAddChildin interfaceNode
jjtGetChild
public Node jjtGetChild(int i)
- Description copied from interface:
Node - This method returns a child node. The children are numbered
from zero, left to right.
- Specified by:
jjtGetChildin interfaceNode
getChild
public SimpleNode getChild(int i)
jjtGetNumChildren
public int jjtGetNumChildren()
- Description copied from interface:
Node - Return the number of children the node has.
- Specified by:
jjtGetNumChildrenin interfaceNode
toString
public java.lang.String toString(java.lang.String prefix)
dump
public void dump(java.lang.String prefix)
prune
public void prune()
- Detach this node from its parent.
This is primarily useful in node serialization.
(see BSHMethodDeclaration)
setSourceFile
public void setSourceFile(java.lang.String sourceFile)
- Set the name of the source file (or more generally source) of
the text from which this node was parsed.
getSourceFile
public java.lang.String getSourceFile()
- Get the name of the source file (or more generally source) of
the text from which this node was parsed.
This will recursively search up the chain of parent nodes until
a source is found or return a string indicating that the source
is unknown.
getLineNumber
public int getLineNumber()
- Get the line number of the starting token
getText
public java.lang.String getText()
- Get the text of the tokens comprising this node.
|
|||||||||
| Home >> All >> [ bsh overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC