本文整理汇总了Java中com.sun.org.apache.bcel.internal.generic.GOTO类的典型用法代码示例。如果您正苦于以下问题:Java GOTO类的具体用法?Java GOTO怎么用?Java GOTO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GOTO类属于com.sun.org.apache.bcel.internal.generic包,在下文中一共展示了GOTO类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: translateTo
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
/**
* Expects an integer on the stack and pushes its string value by calling
* <code>Integer.toString(int i)</code>.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
StringType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(DUP);
final BranchHandle ifNull = il.append(new IFNULL(null));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(_javaClassName,
"toString",
"()" + STRING_SIG)));
final BranchHandle gotobh = il.append(new GOTO(null));
ifNull.setTarget(il.append(POP));
il.append(new PUSH(cpg, ""));
gotobh.setTarget(il.append(NOP));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:ObjectType.java
示例2: translateDesynthesized
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
public void translateDesynthesized(ClassGenerator classGen,
MethodGenerator methodGen) {
final InstructionList il = methodGen.getInstructionList();
final Expression exp = argument();
exp.translateDesynthesized(classGen, methodGen);
final BranchHandle gotoh = il.append(new GOTO(null));
_trueList = exp._falseList; // swap flow lists
_falseList = exp._trueList;
_falseList.add(gotoh);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:NotCall.java
示例3: translateDesynthesized
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
public void translateDesynthesized(ClassGenerator classGen,
MethodGenerator methodGen) {
final InstructionList il = methodGen.getInstructionList();
if (_value) {
il.append(NOP); // true list falls through
}
else {
_falseList.add(il.append(new GOTO(null)));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:BooleanExpr.java
示例4: translateTo
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
/**
* Translates a string into a synthesized boolean.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
BooleanType type) {
final InstructionList il = methodGen.getInstructionList();
FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
il.append(ICONST_1);
final BranchHandle truec = il.append(new GOTO(null));
falsel.backPatch(il.append(ICONST_0));
truec.setTarget(il.append(NOP));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:StringType.java
示例5: translateTo
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
/**
* Expects an integer on the stack and pushes a 0 if its value is 0 and
* a 1 otherwise.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
BooleanType type) {
final InstructionList il = methodGen.getInstructionList();
final BranchHandle falsec = il.append(new IFEQ(null));
il.append(ICONST_1);
final BranchHandle truec = il.append(new GOTO(null));
falsec.setTarget(il.append(ICONST_0));
truec.setTarget(il.append(NOP));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:IntType.java
示例6: translateTo
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
/**
* Expects a real on the stack and pushes a 0 if that number is 0.0 and
* a 1 otherwise.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
BooleanType type) {
final InstructionList il = methodGen.getInstructionList();
FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
il.append(ICONST_1);
final BranchHandle truec = il.append(new GOTO(null));
falsel.backPatch(il.append(ICONST_0));
truec.setTarget(il.append(NOP));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:RealType.java
示例7: translateTo
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
/**
* Expects a boolean on the stack and pushes a string. If the value on the
* stack is zero, then the string 'false' is pushed. Otherwise, the string
* 'true' is pushed.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
StringType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
final BranchHandle falsec = il.append(new IFEQ(null));
il.append(new PUSH(cpg, "true"));
final BranchHandle truec = il.append(new GOTO(null));
falsec.setTarget(il.append(new PUSH(cpg, "false")));
truec.setTarget(il.append(NOP));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:BooleanType.java
示例8: translateTo
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
/**
* Translates a node-set into a synthesized boolean.
* The boolean value of a node-set is "true" if non-empty
* and "false" otherwise. Notice that the
* function getFirstNode() is called in translateToDesynthesized().
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
BooleanType type) {
final InstructionList il = methodGen.getInstructionList();
FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
il.append(ICONST_1);
final BranchHandle truec = il.append(new GOTO(null));
falsel.backPatch(il.append(ICONST_0));
truec.setTarget(il.append(NOP));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:NodeSetType.java
示例9: translateTo
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
/**
* Translates a node into a synthesized boolean.
* If the expression is "@attr",
* then "true" is pushed iff "attr" is an attribute of the current node.
* If the expression is ".", the result is always "true".
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
BooleanType type) {
final InstructionList il = methodGen.getInstructionList();
FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
il.append(ICONST_1);
final BranchHandle truec = il.append(new GOTO(null));
falsel.backPatch(il.append(ICONST_0));
truec.setTarget(il.append(NOP));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:NodeType.java
示例10: translate
import com.sun.org.apache.bcel.internal.generic.GOTO; //导入依赖的package包/类
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final InstructionList il = methodGen.getInstructionList();
_left.translate(classGen, methodGen);
final InstructionHandle gotot = il.append(new GOTO(null));
il.append(methodGen.loadContextNode());
_right.translate(classGen, methodGen);
_left._trueList.backPatch(gotot);
_left._falseList.backPatch(gotot.getNext());
_trueList.append(_right._trueList.add(gotot));
_falseList.append(_right._falseList);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:AlternativePattern.java
注:本文中的com.sun.org.apache.bcel.internal.generic.GOTO类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论