org.jnetstream.lang
Interface Compiler

All Superinterfaces:
com.slytechs.tools.Tool
All Known Subinterfaces:
NplCompiler

public interface Compiler
extends com.slytechs.tools.Tool

jNetStream compiler interface for all types of compilers.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Method Summary
 void compileBinding(Language target, java.lang.String source)
          Compiles an expression to target output.
 void compileExpression()
          Compiles an expression to target output.
 void compileFilter()
          Compiles an expression to target output.
 boolean isTargetSupported(Language lang, OutputKind kind)
          Checks if the combination of output to be generated is supported by this compiler.
 
Methods inherited from interface com.slytechs.tools.Tool
getSourceVersions, run
 

Method Detail

isTargetSupported

boolean isTargetSupported(Language lang,
                          OutputKind kind)
Checks if the combination of output to be generated is supported by this compiler. Not all combinations, or even none at all may be supported by this compiler.

Parameters:
lang - target language
kind - target output type
Returns:
true means it is supported otherwise false

compileExpression

void compileExpression()
Compiles an expression to target output. For Language.JAVA and Language.JASIM target language the generated classfile will implement the Expression interface. Once the output class is compiled or assemged down to a concrete from the output generated by this compiler, the class will implement the Expression interface. For other Language types, the behavior will be similar but in the context of the output language.


compileBinding

void compileBinding(Language target,
                    java.lang.String source)
Compiles an expression to target output.

Parameters:
target - TODO
source - TODO

compileFilter

void compileFilter()
Compiles an expression to target output.