com.saxonica.codegen
Class JavaDeclaration

java.lang.Object
  extended by com.saxonica.codegen.JavaDeclaration
All Implemented Interfaces:
ReturnAction

public class JavaDeclaration
extends Object
implements ReturnAction

A return action that assigns the value of the expression to a variable supplied by the caller


Constructor Summary
JavaDeclaration(Class theClass, String varName)
           
 
Method Summary
 Class getVariableClass()
          Get the class of the variable
 String getVariableName()
          Get the name of the variable holding the result
 String output(CompilerService compiler, String expression)
          Generate the return text
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaDeclaration

public JavaDeclaration(Class theClass,
                       String varName)
Method Detail

getVariableClass

public Class getVariableClass()
Get the class of the variable


output

public String output(CompilerService compiler,
                     String expression)
Generate the return text

Specified by:
output in interface ReturnAction

getVariableName

public String getVariableName()
Get the name of the variable holding the result

Specified by:
getVariableName in interface ReturnAction


Copyright (C) Michael H. Kay. All rights reserved.