Interface FunctionGeneratorHelper


public interface FunctionGeneratorHelper
various utility functions to help generate code for the SEP.
Author:
Greg Higgins
  • Method Summary

    Static Methods 
    Modifier and Type Method Description
    static <T> java.lang.Class<T> compile​(java.io.Reader srcFile, java.lang.String fqn)  
    static <T> java.lang.Class<T> compile​(java.io.Reader srcFile, java.lang.String fqn, boolean isTest)  
    static <T> java.lang.Class<T> compileTest​(java.io.Reader srcFile, java.lang.String fqn)  
    static void deleteGeneratedClass​(com.fluxtion.builder.generation.GenerationContext generationConfig, java.lang.String generatedClassName)  
    static <T> java.lang.Class<T> generateAndCompile​(T node, java.lang.String templateFile, com.fluxtion.builder.generation.GenerationContext generationConfig, org.apache.velocity.context.Context ctx)  
    static void initVelocity()  
    static int intFromMap​(java.util.Map<java.lang.String,​?> configMap, java.lang.String key, int defualtValue)  
    static java.io.File resourcesDir​(boolean isTest)  
    static java.io.File sourcesDir​(boolean isTest)  
    static java.lang.String writeSourceFile​(java.lang.Object node, java.lang.String templateFile, com.fluxtion.builder.generation.GenerationContext generationConfig, org.apache.velocity.context.Context ctx)  
  • Method Details

    • intFromMap

      static int intFromMap​(java.util.Map<java.lang.String,​?> configMap, java.lang.String key, int defualtValue)
    • sourcesDir

      static java.io.File sourcesDir​(boolean isTest)
    • resourcesDir

      static java.io.File resourcesDir​(boolean isTest)
    • compile

      static <T> java.lang.Class<T> compile​(java.io.Reader srcFile, java.lang.String fqn) throws java.io.IOException, java.lang.ClassNotFoundException
      Throws:
      java.io.IOException
      java.lang.ClassNotFoundException
    • compileTest

      static <T> java.lang.Class<T> compileTest​(java.io.Reader srcFile, java.lang.String fqn) throws java.io.IOException, java.lang.ClassNotFoundException
      Throws:
      java.io.IOException
      java.lang.ClassNotFoundException
    • compile

      static <T> java.lang.Class<T> compile​(java.io.Reader srcFile, java.lang.String fqn, boolean isTest) throws java.io.IOException, java.lang.ClassNotFoundException
      Throws:
      java.io.IOException
      java.lang.ClassNotFoundException
    • generateAndCompile

      static <T> java.lang.Class<T> generateAndCompile​(T node, java.lang.String templateFile, com.fluxtion.builder.generation.GenerationContext generationConfig, org.apache.velocity.context.Context ctx) throws java.io.IOException, org.apache.velocity.exception.MethodInvocationException, org.apache.velocity.exception.ParseErrorException, org.apache.velocity.exception.ResourceNotFoundException, java.lang.ClassNotFoundException
      Throws:
      java.io.IOException
      org.apache.velocity.exception.MethodInvocationException
      org.apache.velocity.exception.ParseErrorException
      org.apache.velocity.exception.ResourceNotFoundException
      java.lang.ClassNotFoundException
    • writeSourceFile

      static java.lang.String writeSourceFile​(java.lang.Object node, java.lang.String templateFile, com.fluxtion.builder.generation.GenerationContext generationConfig, org.apache.velocity.context.Context ctx) throws java.io.IOException, org.apache.velocity.exception.MethodInvocationException, org.apache.velocity.exception.ParseErrorException, org.apache.velocity.exception.ResourceNotFoundException
      Throws:
      java.io.IOException
      org.apache.velocity.exception.MethodInvocationException
      org.apache.velocity.exception.ParseErrorException
      org.apache.velocity.exception.ResourceNotFoundException
    • deleteGeneratedClass

      static void deleteGeneratedClass​(com.fluxtion.builder.generation.GenerationContext generationConfig, java.lang.String generatedClassName)
    • initVelocity

      static void initVelocity() throws java.lang.RuntimeException
      Throws:
      java.lang.RuntimeException