Methods Summary |
---|
protected java.lang.Object | clone()Creates and returns a copy of this object.
The returned EJBQLAST shares the same state as this object, meaning
the fields type, text, line, column, and typeInfo have the same values.
But it is not bound to any tree structure, thus the child is null
and the sibling is null.
EJBQLAST clone = (EJBQLAST)super.clone();
clone.setFirstChild(null);
clone.setNextSibling(null);
return clone;
|
public int | getColumn()
return column;
|
private java.lang.String | getIndent(int level)Returns the indent specified by level.
StringBuffer buf = new StringBuffer();
for (int i = 0; i < level; i++) {
buf.append(INDENT);
}
return buf.toString();
|
public int | getLine()
return line;
|
public java.lang.String | getTreeRepr(java.lang.String title)Returns a full string representation of this JQLAST.
The returned string starts with the specified title string,
followed by the string representation of this ast,
followed by the string representation of the child ast nodes of this ast.
The method dumps each ast node on a separate line.
Child ast nodes are indented.
The method calls toString to dump a single node w/o children.
return title + this.getTreeRepr(0);
|
private java.lang.String | getTreeRepr(int level)Helper method for getTreeRepr.
StringBuffer repr = new StringBuffer();
// current node
repr.append(SEPARATOR);
repr.append(getIndent(level));
repr.append(this.toString());
// handle children
for (EJBQLAST node = (EJBQLAST)this.getFirstChild();
node != null;
node = (EJBQLAST)node.getNextSibling()) {
repr.append(node.getTreeRepr(level+1));
}
return repr.toString();
|
public java.lang.Object | getTypeInfo()
return typeInfo;
|
public void | initialize(persistence.antlr.Token t)
setType(t.getType());
setText(t.getText());
setLine(t.getLine());
setColumn(t.getColumn());
|
public void | initialize(int type, java.lang.String text, java.lang.Object typeInfo)
setType(type);
setText(text);
setTypeInfo(typeInfo);
|
public void | initialize(persistence.antlr.collections.AST _ast)
EJBQLAST ast = (EJBQLAST)_ast;
setType(ast.getType());
setText(ast.getText());
setLine(ast.getLine());
setColumn(ast.getColumn());
setTypeInfo(ast.getTypeInfo());
|
public void | setColumn(int column)
this.column = column;
|
public void | setLine(int line)
this.line = line;
|
public void | setTypeInfo(java.lang.Object typeInfo)
this.typeInfo = typeInfo;
|
public java.lang.String | toString()Returns a string representation of this EJBQLAST w/o child ast nodes.
Object typeInfo = getTypeInfo();
StringBuffer repr = new StringBuffer();
// token text
repr.append((getText() == null ? "null" : getText())); //NOI18N
repr.append(" ["); //NOI18N
// token type
repr.append(getType());
// line/column info
repr.append(", ("); //NOI18N
repr.append(getLine() + "/" + getColumn()); //NOI18N
repr.append(")"); //NOI18N
// type info
repr.append(", "); //NOI18N
repr.append(typeInfo);
repr.append("]"); //NOI18N
return repr.toString();
|