Class JWebAssemblyCompiler

java.lang.Object
io.schram.jwebassembly.JWebAssemblyCompiler

public class JWebAssemblyCompiler extends Object
Facade for the "de.inetsoftware.jwebassembly.JWebAssembly" class. Retrieves and accesses the class via reflection.
  • Field Details

    • COMPILER_CLASS_NAME

      static final String COMPILER_CLASS_NAME
      See Also:
    • compiler

      private final Object compiler
    • addFile

      private final Method addFile
    • compileToBinary

      private final Method compileToBinary
    • compileToText

      private final Method compileToText
    • setProperty

      private final Method setProperty
    • addLibrary

      private final Method addLibrary
    • log

      private final org.codehaus.plexus.logging.Logger log
  • Constructor Details

    • JWebAssemblyCompiler

      JWebAssemblyCompiler(org.apache.maven.artifact.Artifact compilerDependency, org.codehaus.plexus.logging.Logger log) throws org.apache.maven.plugin.MojoExecutionException
      Facade class for interacting with a (reflectively accessed) JWebAssembly instance
      Throws:
      org.apache.maven.plugin.MojoExecutionException
  • Method Details

    • getReferenceToCompilerFor

      private static Class<?> getReferenceToCompilerFor(org.apache.maven.artifact.Artifact compilerDependency) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getMethod

      private static Method getMethod(Class<?> clazz, String name, Class<?>... parameterTypes) throws Exception
      Throws:
      Exception
    • addFile

      void addFile(File file) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • addLibrary

      void addLibrary(File file) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • setProperty

      void setProperty(String key, String value) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • compileToBinary

      void compileToBinary(File target) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • compileToText

      void compileToText(File target) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException