public class ContainsCompiler extends ToBooleanCompiler
| Constructor and Description |
|---|
ContainsCompiler() |
| Modifier and Type | Method and Description |
|---|---|
void |
compileToBoolean(CompilerService compiler,
Expression expression)
Generate bytecode to evaluate the expression as a boolean
Precondition: none.
|
protected static void |
returnIfEmpty(CompilerService compiler,
Expression arg,
LabelInfo returnLabel,
int popsNeeded)
Utility method for use by subclasses to generate code that causes an boolean result to be returned
if the first argument is an empty sequence or zero-length string.
|
static void |
useDynamicCollation(CompilerService compiler,
CollatingFunction function,
StringCollator stringCollator)
Common code for handling non-standard collations in starts-with and similar functions.
|
compileToItem, compileToIterator, compileToPushallocateStatic, compileItemFromInt, compileItemFromString, compileToLoop, compileToPrimitive, generateMethod, handleEmptyStringResult, throwXPathException, throwXPathException, unboxItem, verify, visitAnnotation, visitLineNumberpublic void compileToBoolean(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompilercompileToBoolean in class ExpressionCompilercompiler - the compiler serviceexpression - the expression to be compiledCannotCompileExceptionprotected static void returnIfEmpty(CompilerService compiler, Expression arg, LabelInfo returnLabel, int popsNeeded)
compiler - the compilerarg - the first argumentreturnLabel - the label to jump to if the argument is an empty sequence or zero-length stringpopsNeeded - the number of items to pop from the stack if jumping to the return labelpublic static void useDynamicCollation(CompilerService compiler, CollatingFunction function, StringCollator stringCollator) throws CannotCompileException
compiler - function - stringCollator - CannotCompileExceptionCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.