本文整理汇总了Java中com.sun.org.apache.xpath.internal.compiler.Compiler.getArgLengthOfStep方法的典型用法代码示例。如果您正苦于以下问题:Java Compiler.getArgLengthOfStep方法的具体用法?Java Compiler.getArgLengthOfStep怎么用?Java Compiler.getArgLengthOfStep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xpath.internal.compiler.Compiler
的用法示例。
在下文中一共展示了Compiler.getArgLengthOfStep方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: analyzePredicate
import com.sun.org.apache.xpath.internal.compiler.Compiler; //导入方法依赖的package包/类
/**
* Analyze a step and give information about it's predicates. Right now this
* just returns true or false if the step has a predicate.
*
* @param compiler non-null reference to compiler object that has processed
* the XPath operations into an opcode map.
* @param opPos The opcode position for the step.
* @param stepType The type of step, one of OP_GROUP, etc.
*
* @return true if step has a predicate.
*
* @throws javax.xml.transform.TransformerException
*/
static boolean analyzePredicate(Compiler compiler, int opPos, int stepType)
throws javax.xml.transform.TransformerException
{
int argLen;
switch (stepType)
{
case OpCodes.OP_VARIABLE :
case OpCodes.OP_EXTFUNCTION :
case OpCodes.OP_FUNCTION :
case OpCodes.OP_GROUP :
argLen = compiler.getArgLength(opPos);
break;
default :
argLen = compiler.getArgLengthOfStep(opPos);
}
int pos = compiler.getFirstPredicateOpPos(opPos);
int nPredicates = compiler.countPredicates(pos);
return (nPredicates > 0) ? true : false;
}