Methods Summary |
---|
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 com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.Type | getJQLType()
return jqlType;
|
public int | getLine()
return line;
|
public com.sun.jdo.spi.persistence.support.sqlstore.RetrieveDesc | getRetrieveDesc()
return rd;
|
public static java.lang.String | getRetrieveDescRepr(com.sun.jdo.spi.persistence.support.sqlstore.RetrieveDesc rd)Returns a string representation of the spceified RetrieveDesc.
StringBuffer buf = new StringBuffer();
buf.append("RD:"); //NOI18N
if (rd == null)
{
buf.append("null"); //NOI18N
}
else
{
String pcClassName = rd.getPersistenceCapableClass().toString();
if (pcClassName.startsWith("class ")) //NOI18N
buf.append(pcClassName.substring(6));
else
buf.append(pcClassName);
buf.append("@"); //NOI18N
buf.append(System.identityHashCode(rd));
}
return buf.toString();
|
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 (JQLAST node = (JQLAST)this.getFirstChild();
node != null;
node = (JQLAST)node.getNextSibling()) {
repr.append(node.getTreeRepr(level+1));
}
return repr.toString();
|
public java.lang.Object | getValue()
return value;
|
public void | initialize(int type, java.lang.String text, com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.Type jqlType, java.lang.Object value)
setType(type);
setText(text);
setJQLType(jqlType);
setValue(value);
|
public void | initialize(persistence.antlr.collections.AST ast)
initialize((JQLAST)ast);
|
public void | initialize(com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.JQLAST ast)
setType(ast.getType());
setText(ast.getText());
setLine(ast.getLine());
setColumn(ast.getColumn());
setJQLType(ast.getJQLType());
setValue(ast.getValue());
setRetrieveDesc(ast.getRetrieveDesc());
setValue(ast.getValue());
|
public void | initialize(int type)
setType(type);
|
public void | initialize(int type, java.lang.String text)
setType(type);
setText(text);
|
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, com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.Type jqlType)
setType(type);
setText(text);
setJQLType(jqlType);
|
public void | setColumn(int column)
this.column = column;
|
public void | setJQLType(com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.Type jqlType)
this.jqlType = jqlType;
|
public void | setLine(int line)
this.line = line;
|
public void | setRetrieveDesc(com.sun.jdo.spi.persistence.support.sqlstore.RetrieveDesc rd)
this.rd = rd;
|
public void | setValue(java.lang.Object value)
this.value = value;
|
public java.lang.String | toString()Returns a string representation of this JQLAST w/o child nodes.
StringBuffer repr = new StringBuffer();
Object jqlType = getJQLType();
RetrieveDesc rd = getRetrieveDesc();
// 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(jqlType);
// RetrieveDesc info
repr.append(", "); //NOI18N
repr.append(getRetrieveDescRepr(rd));
repr.append("]"); //NOI18N
return repr.toString();
|