org.jaitools.jiffle.parser
Interface SourceGenerator

All Known Implementing Classes:
AbstractSourceGenerator

public interface SourceGenerator

Defines methods for classes that generate runtime Java source from compiled Jiffle scripts.

Since:
0.1
Version:
$Id: SourceGenerator.java 1653 2011-06-16 10:23:02Z michael.bedward $
Author:
Michael Bedward

Method Summary
 java.lang.String getSource(java.lang.String script)
          Returns the source for the runtime class.
 void setBaseClassName(java.lang.String baseClassName)
          Sets the runtime base class name.
 void setRuntimeModel(Jiffle.RuntimeModel model)
          Sets the runtime model.
 

Method Detail

setRuntimeModel

void setRuntimeModel(Jiffle.RuntimeModel model)
Sets the runtime model.

Parameters:
model - runtime model

setBaseClassName

void setBaseClassName(java.lang.String baseClassName)
Sets the runtime base class name.

Parameters:
baseClassName - base class name

getSource

java.lang.String getSource(java.lang.String script)
                           throws JiffleException
Returns the source for the runtime class. The runtime model and base class name must be set before calling this method. If the script is passed to this method it will be included in the class javadocs.

Parameters:
script - the Jiffle script which is being compiled; may be null or empty
Returns:
source of the runtime class as a single String.
Throws:
JiffleException - on errors creating source
java.lang.RuntimeException - if the runtime model or base class name are not set


Copyright © 2011. All Rights Reserved.