Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.saxonica.codegen
Class LetExpressionCompiler

    java.lang.Object
      com.saxonica.codegen.ExpressionCompiler
          com.saxonica.codegen.SequenceExpressionCompiler
              com.saxonica.codegen.LetExpressionCompiler

    public class LetExpressionCompiler

extends SequenceExpressionCompiler

Compiles Java code to implement a Let expression

Constructor Summary
`LetExpressionCompiler()`

Method Summary
`void` | `compileAsLoop(CompilerService compiler, Expression expr, LoopAction action)` Compile an expression in the form of a loop.
`void` | `compilePush(CompilerService compiler, Expression expr)` Compile code to push the results of the expression to the current output receiver
`java.lang.String` | `compileToCharSequence(CompilerService compiler, Expression expr)` Generate Java code to evaluate the expression as a CharSequence
`java.lang.String` | `compileToEffectiveBooleanValue(CompilerService compiler, Expression expr, ReturnAction options)` Compile code to produce the effective boolean value of the expression
`java.lang.String` | `compileToItem(CompilerService compiler, Expression expr)` Compile code to return the results of the expression as an Item.
`java.lang.String` | `compileToIterator(CompilerService compiler, Expression expr)` Compile code to produce a SequenceIterator over the results of the expression
`java.lang.String` | `compileToValueRepresentation(CompilerService compiler, Expression expr)` Generate Java code to evaluate the expression as a ValueRepresentation

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LetExpressionCompiler

    public LetExpressionCompiler()

Method Detail

### compileToIterator

    public java.lang.String compileToIterator(CompilerService compiler,
                                              Expression expr)

  Compile code to produce a SequenceIterator over the results of the expression

  Specified by:
    `compileToIterator` in class `ExpressionCompiler`
  Parameters:
    `compiler` - The CompilerService
    `expr` - the LetExpression to be compiled
  Returns:
    the compiled Java expression

### compileToValueRepresentation

    public java.lang.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

### compileAsLoop

    public void compileAsLoop(CompilerService compiler,
                              Expression expr,
                              LoopAction action)

  Compile an expression in the form of a loop. Default implementation.

  Overrides:
    `compileAsLoop` in class `ExpressionCompiler`
  Parameters:
    `compiler` - the CompilerService
    `expr` - the expression to be compiled
    `action` - the action to be taken to process each item in the sequence returned by the expression

### compilePush

    public void compilePush(CompilerService compiler,
                            Expression expr)

  Compile code to push the results of the expression to the current output receiver

  Overrides:
    `compilePush` in class `SequenceExpressionCompiler`
  Parameters:
    `compiler` - The CompilerService
    `expr` - the LetExpression to be compiled

### compileToItem

    public java.lang.String compileToItem(CompilerService compiler,
                                          Expression expr)

  Compile code to return the results of the expression as an Item. For use only when the cardinality is known to be zero-or-one

  Overrides:
    `compileToItem` in class `SequenceExpressionCompiler`
  Parameters:
    `compiler` - The CompilerService
    `expr` - the LetExpression to be compiled
  Returns:
    the compiled Java expression

### compileToEffectiveBooleanValue

    public java.lang.String compileToEffectiveBooleanValue(CompilerService compiler,
                                                           Expression expr,
                                                           ReturnAction options)

  Compile code to produce the effective boolean value of the expression

  Overrides:
    `compileToEffectiveBooleanValue` in class `SequenceExpressionCompiler`
  Parameters:
    `compiler` - The CompilerService
    `expr` - the LetExpression to be compiled
    `options` -
  Returns:
    the compiled Java expression

### compileToCharSequence

    public java.lang.String compileToCharSequence(CompilerService compiler,
                                                  Expression expr)

  Description copied from class: `ExpressionCompiler`
  Generate Java code to evaluate the expression as a CharSequence

  Overrides:
    `compileToCharSequence` in class `SequenceExpressionCompiler`
  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, or a string literal) which will be of class `CharSequence`, and which will hold the string value of the XPath expression at run-time

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) Saxonica Limited. All rights reserved.