本文整理了Java中org.antlr.runtime.tree.Tree.setChildIndex()
方法的一些代码示例,展示了Tree.setChildIndex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.setChildIndex()
方法的具体详情如下:
包路径:org.antlr.runtime.tree.Tree
类名称:Tree
方法名:setChildIndex
暂无
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
@Override
public void setChildIndex(Object t, int index) {
if ( t!=null ) ((Tree)t).setChildIndex(index);
}
代码示例来源:origin: antlr/antlr3
@Override
public void setChildIndex(Object t, int index) {
if ( t!=null ) ((Tree)t).setChildIndex(index);
}
代码示例来源:origin: antlr/antlr3
@Override
public void setChildIndex(Object t, int index) {
if ( t!=null ) ((Tree)t).setChildIndex(index);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr-runtime
@Override
public void setChildIndex(Object t, int index) {
if ( t!=null ) ((Tree)t).setChildIndex(index);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
@Override
public void setChildIndex(Object t, int index) {
if ( t!=null ) ((Tree)t).setChildIndex(index);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
public void setChildIndex(Object t, int index) {
if ( t!=null ) ((Tree)t).setChildIndex(index);
}
代码示例来源:origin: antlr/antlr3
@Override
public void setChild(int i, Tree t) {
if ( t==null ) {
return;
}
if ( t.isNil() ) {
throw new IllegalArgumentException("Can't set single child to a list");
}
if ( children==null ) {
children = createChildrenList();
}
children.set(i, t);
t.setParent(this);
t.setChildIndex(i);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
public void setChild(int i, Tree t) {
if ( t==null ) {
return;
}
if ( t.isNil() ) {
throw new IllegalArgumentException("Can't set single child to a list");
}
if ( children==null ) {
children = createChildrenList();
}
children.set(i, t);
t.setParent(this);
t.setChildIndex(i);
}
代码示例来源:origin: antlr/antlr3
@Override
public void setChild(int i, Tree t) {
if ( t==null ) {
return;
}
if ( t.isNil() ) {
throw new IllegalArgumentException("Can't set single child to a list");
}
if ( children==null ) {
children = createChildrenList();
}
children.set(i, t);
t.setParent(this);
t.setChildIndex(i);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr-runtime
@Override
public void setChild(int i, Tree t) {
if ( t==null ) {
return;
}
if ( t.isNil() ) {
throw new IllegalArgumentException("Can't set single child to a list");
}
if ( children==null ) {
children = createChildrenList();
}
children.set(i, t);
t.setParent(this);
t.setChildIndex(i);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
@Override
public void setChild(int i, Tree t) {
if ( t==null ) {
return;
}
if ( t.isNil() ) {
throw new IllegalArgumentException("Can't set single child to a list");
}
if ( children==null ) {
children = createChildrenList();
}
children.set(i, t);
t.setParent(this);
t.setChildIndex(i);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr-runtime
public void freshenParentAndChildIndexes(int offset) {
int n = getChildCount();
for (int c = offset; c < n; c++) {
Tree child = getChild(c);
child.setChildIndex(c);
child.setParent(this);
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public void freshenParentAndChildIndexes(int offset) {
int n = getChildCount();
for (int c = offset; c < n; c++) {
Tree child = getChild(c);
child.setChildIndex(c);
child.setParent(this);
}
}
代码示例来源:origin: antlr/antlr3
public void freshenParentAndChildIndexes(int offset) {
int n = getChildCount();
for (int c = offset; c < n; c++) {
Tree child = getChild(c);
child.setChildIndex(c);
child.setParent(this);
}
}
代码示例来源:origin: antlr/antlr3
public void freshenParentAndChildIndexes(int offset) {
int n = getChildCount();
for (int c = offset; c < n; c++) {
Tree child = getChild(c);
child.setChildIndex(c);
child.setParent(this);
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
public void freshenParentAndChildIndexes(int offset) {
int n = getChildCount();
for (int c = offset; c < n; c++) {
Tree child = getChild(c);
child.setChildIndex(c);
child.setParent(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
public void freshenParentAndChildIndexes(int offset) {
int n = getChildCount();
for (int c = offset; c < n; c++) {
Tree child = (Tree)getChild(c);
child.setChildIndex(c);
child.setParent(this);
}
}
代码示例来源:origin: antlr/antlr3
/** Transform ^(nil x) to x and nil to null */
@Override
public Object rulePostProcessing(Object root) {
//System.out.println("rulePostProcessing: "+((Tree)root).toStringTree());
Tree r = (Tree)root;
if ( r!=null && r.isNil() ) {
if ( r.getChildCount()==0 ) {
r = null;
}
else if ( r.getChildCount()==1 ) {
r = r.getChild(0);
// whoever invokes rule will set parent and child index
r.setParent(null);
r.setChildIndex(-1);
}
}
return r;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/** Transform ^(nil x) to x and nil to null */
public Object rulePostProcessing(Object root) {
//System.out.println("rulePostProcessing: "+((Tree)root).toStringTree());
Tree r = (Tree)root;
if ( r!=null && r.isNil() ) {
if ( r.getChildCount()==0 ) {
r = null;
}
else if ( r.getChildCount()==1 ) {
r = (Tree)r.getChild(0);
// whoever invokes rule will set parent and child index
r.setParent(null);
r.setChildIndex(-1);
}
}
return r;
}
代码示例来源:origin: antlr/antlr3
/** Transform ^(nil x) to x and nil to null */
@Override
public Object rulePostProcessing(Object root) {
//System.out.println("rulePostProcessing: "+((Tree)root).toStringTree());
Tree r = (Tree)root;
if ( r!=null && r.isNil() ) {
if ( r.getChildCount()==0 ) {
r = null;
}
else if ( r.getChildCount()==1 ) {
r = r.getChild(0);
// whoever invokes rule will set parent and child index
r.setParent(null);
r.setChildIndex(-1);
}
}
return r;
}
内容来源于网络,如有侵权,请联系作者删除!