本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList.add方法的典型用法代码示例。如果您正苦于以下问题:Java FlowList.add方法的具体用法?Java FlowList.add怎么用?Java FlowList.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList
的用法示例。
在下文中一共展示了FlowList.add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: translateToDesynthesized
import com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList; //导入方法依赖的package包/类
/**
* Translates a real into a non-synthesized boolean. It does not push a
* 0 or a 1 but instead returns branchhandle list to be appended to the
* false list. A NaN must be converted to "false".
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateToDesynthesized
*/
public FlowList translateToDesynthesized(ClassGenerator classGen,
MethodGenerator methodGen,
BooleanType type) {
LocalVariableGen local;
final FlowList flowlist = new FlowList();
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// Store real into a local variable
il.append(DUP2);
local = methodGen.addLocalVariable("real_to_boolean_tmp",
com.sun.org.apache.bcel.internal.generic.Type.DOUBLE,
null, null);
local.setStart(il.append(new DSTORE(local.getIndex())));
// Compare it to 0.0
il.append(DCONST_0);
il.append(DCMPG);
flowlist.add(il.append(new IFEQ(null)));
//!!! call isNaN
// Compare it to itself to see if NaN
il.append(new DLOAD(local.getIndex()));
local.setEnd(il.append(new DLOAD(local.getIndex())));
il.append(DCMPG);
flowlist.add(il.append(new IFNE(null))); // NaN != NaN
return flowlist;
}