Class JavaExprCompiler

java.lang.Object
org.faktorips.fl.ExprCompiler<org.faktorips.codegen.JavaCodeFragment>
org.faktorips.fl.JavaExprCompiler

public class JavaExprCompiler extends ExprCompiler<org.faktorips.codegen.JavaCodeFragment>
This ExprCompiler implementation generates Java source code.

This class is not thread safe!

  • Constructor Details

    • JavaExprCompiler

      public JavaExprCompiler()
      Creates a new compiler. Messages returned by the compiler are generated using the default locale.
    • JavaExprCompiler

      public JavaExprCompiler(Locale locale)
      Creates a new compiler.
      Parameters:
      locale - The locale that is used to generate locale dependent messages.
  • Method Details

    • registerDefaults

      protected void registerDefaults()
      Description copied from class: ExprCompiler
      Registers the default operations.
      Specified by:
      registerDefaults in class ExprCompiler<org.faktorips.codegen.JavaCodeFragment>
    • convertPrimitiveToWrapper

      protected org.faktorips.codegen.JavaCodeFragment convertPrimitiveToWrapper(org.faktorips.datatype.Datatype resultType, org.faktorips.codegen.JavaCodeFragment codeFragment)
      Specified by:
      convertPrimitiveToWrapper in class ExprCompiler<org.faktorips.codegen.JavaCodeFragment>
    • newParseTreeVisitor

      protected ParseTreeVisitor<org.faktorips.codegen.JavaCodeFragment> newParseTreeVisitor()
      Specified by:
      newParseTreeVisitor in class ExprCompiler<org.faktorips.codegen.JavaCodeFragment>
    • newCompilationResultImpl

      protected AbstractCompilationResult<org.faktorips.codegen.JavaCodeFragment> newCompilationResultImpl(org.faktorips.runtime.Message message)
      Specified by:
      newCompilationResultImpl in class ExprCompiler<org.faktorips.codegen.JavaCodeFragment>
    • newCompilationResultImpl

      protected AbstractCompilationResult<org.faktorips.codegen.JavaCodeFragment> newCompilationResultImpl(org.faktorips.codegen.JavaCodeFragment sourcecode, org.faktorips.datatype.Datatype datatype)
      Specified by:
      newCompilationResultImpl in class ExprCompiler<org.faktorips.codegen.JavaCodeFragment>
    • getDatatypeHelper

      public org.faktorips.codegen.DatatypeHelper getDatatypeHelper(org.faktorips.datatype.Datatype type)
      Description copied from class: ExprCompiler
      Returns the code generation helper for the given type or null if no helper is available.
      Overrides:
      getDatatypeHelper in class ExprCompiler<org.faktorips.codegen.JavaCodeFragment>