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, compileToPush
allocateStatic, compileItemFromInt, compileToLoop, compileToPrimitive, generateMethod, handleEmptyStringResult, unboxItem, verify, visitAnnotation, visitLineNumber
public void compileToBoolean(CompilerService compiler, Expression expression) throws CannotCompileException
ExpressionCompiler
compileToBoolean
in class ExpressionCompiler
compiler
- the compiler serviceexpression
- the expression to be compiledCannotCompileException
protected 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
- CannotCompileException
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.