com.saxonica.codegen
Class BlockCompiler

java.lang.Object
  extended by com.saxonica.codegen.ExpressionCompiler
      extended by com.saxonica.codegen.PushExpressionCompiler
          extended by com.saxonica.codegen.BlockCompiler

public class BlockCompiler
extends PushExpressionCompiler

Generate Java code for a Block, that is a sequence of expressions or instructions


Constructor Summary
BlockCompiler()
           
 
Method Summary
 void compilePush(CompilerService compiler, Expression exp)
          Generate Java code to execute the expression in push mode, that is, code to write events to the current output Receiver
 String compileToIterator(CompilerService compiler, Expression expr)
          Generate Java code to evaluate the expression as a SequenceIterator
 String compileToValueRepresentation(CompilerService compiler, Expression expr)
          Generate Java code to evaluate the expression as a ValueRepresentation
 
Methods inherited from class com.saxonica.codegen.PushExpressionCompiler
compileToCharSequence, compileToEffectiveBooleanValue, compileToItem, getStaticBaseURI, prepareToPush
 
Methods inherited from class com.saxonica.codegen.ExpressionCompiler
compileAsLoop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockCompiler

public BlockCompiler()
Method Detail

compilePush

public void compilePush(CompilerService compiler,
                        Expression exp)
Description copied from class: ExpressionCompiler
Generate Java code to execute the expression in push mode, that is, code to write events to the current output Receiver

Specified by:
compilePush in class ExpressionCompiler
Parameters:
compiler - the compiler service
exp - the expression to be compiled

compileToValueRepresentation

public String compileToValueRepresentation(CompilerService compiler,
                                           Expression expr)
Description copied from class: ExpressionCompiler
Generate Java code to evaluate the expression as a ValueRepresentation

Overrides:
compileToValueRepresentation in class ExpressionCompiler
Parameters:
compiler - the compiler service
expr - the expression to be compiled
Returns:
a simple Java expression (usually the name of a variable that has been declared) which will be of class ValueRepresentation, and which at run-time will hold the value of the expression

compileToIterator

public String compileToIterator(CompilerService compiler,
                                Expression expr)
Description copied from class: ExpressionCompiler
Generate Java code to evaluate the expression as a SequenceIterator

Overrides:
compileToIterator in class PushExpressionCompiler
Parameters:
compiler - the compiler service
expr - the XPath expression to be compiled
Returns:
a simple Java expression (usually the name of a variable that has been declared) which will be of class SequenceIterator, and which at run-time will hold an iterator over the the value of the XPath expression


Copyright (c) Saxonica Limited. All rights reserved.