## com.saxonica.codegen
Class ValueCompiler

    java.lang.Object
      com.saxonica.codegen.ValueCompiler

Direct Known Subclasses:
  AnyURIValueCompiler, Base64BinaryValueCompiler, BigIntegerValueCompiler, BooleanValueCompiler, DateTimeValueCompiler, DateValueCompiler, DayTimeDurationValueCompiler, DecimalValueCompiler, DoubleValueCompiler, DurationValueCompiler, EmptySequenceCompiler, FloatValueCompiler, GDayValueCompiler, GMonthDayValueCompiler, GMonthValueCompiler, GYearMonthValueCompiler, GYearValueCompiler, HexBinaryValueCompiler, Int64ValueCompiler, IntegerRangeCompiler, NotationValueCompiler, QNameValueCompiler, SequenceExtentCompiler, StringValueCompiler, TimeValueCompiler, UntypedAtomicValueCompiler, YearMonthDurationValueCompiler

    public abstract class ValueCompiler

extends java.lang.Object

Compile a literal value to Java code

Constructor Summary
`ValueCompiler()`

Method Summary
`void` `compilePush(CompilerService compiler, Value value)`
`java.lang.String` `compileToCharSequence(CompilerService compiler, AtomicValue av)` Compile Java code whose effect is to compute the string value of the expression; the generated code returns a CharSequence.
`java.lang.String` `compileToEffectiveBooleanValue(CompilerService compiler, Value expr, ReturnAction options)`
`java.lang.String` `compileToItem(CompilerService compiler, AtomicValue value)`
`java.lang.String` `compileToIterator(CompilerService compiler, Value val)`
`java.lang.Class` `getJavaClass(AtomicValue value)`
`abstract java.lang.String` `toJavaExpression(AtomicValue value, CompilerService compiler)`

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

Constructor Detail

### ValueCompiler

    public ValueCompiler()

Method Detail

### compilePush

    public void compilePush(CompilerService compiler,
                            Value value)

### compileToItem

    public java.lang.String compileToItem(CompilerService compiler,
                                          AtomicValue value)

### compileToIterator

    public java.lang.String compileToIterator(CompilerService compiler,
                                              Value val)

### compileToEffectiveBooleanValue

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

### compileToCharSequence

    public java.lang.String compileToCharSequence(CompilerService compiler,
                                                  AtomicValue av)

  Compile Java code whose effect is to compute the string value of the expression; the generated code returns a CharSequence. This method must only be called for an expression that is known to return a value of type xs:string

  Parameters:
    `av` - The atomic value to be compiled
  Returns:
    the name of a variable to which the resulting CharSequence is assigned, or a Java expression that can be used in a place where a variable reference of type CharSequence is allowed.

### toJavaExpression

    public abstract java.lang.String toJavaExpression(AtomicValue value,
                                                      CompilerService compiler)

### getJavaClass

    public java.lang.Class getJavaClass(AtomicValue value)

Copyright (c) Saxonica Limited. All rights reserved.