Class Javac

  • All Implemented Interfaces:
    net.ssehub.easy.instantiation.core.model.vilTypes.IVilType

    public class Javac
    extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
    Compiles java files using Javac.
    Author:
    Holger Eichelberger, El-Sharkawy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String JAVA_HOME  
    • Constructor Summary

      Constructors 
      Constructor Description
      Javac()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static javax.tools.JavaCompiler getJavaCompiler()
      Gets the Java™ programming language compiler provided with this platform.
      static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> javac​(net.ssehub.easy.instantiation.core.model.artifactModel.Path source, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, java.util.Map<java.lang.String,​java.lang.Object> other)
      Compiles a source path to a target path.
      static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> javac​(net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> source, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, java.util.Map<java.lang.String,​java.lang.Object> other)
      Compiles a source path to a target path.
      • Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator

        determineTargetPath, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Javac

        public Javac()
    • Method Detail

      • javac

        public static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> javac​(net.ssehub.easy.instantiation.core.model.artifactModel.Path source,
                                                                                                                                                       net.ssehub.easy.instantiation.core.model.artifactModel.Path target,
                                                                                                                                                       java.util.Map<java.lang.String,​java.lang.Object> other)
                                                                                                                                                throws net.ssehub.easy.instantiation.core.model.common.VilException
        Compiles a source path to a target path.
        Parameters:
        source - the source path
        target - the target path
        other - the other parameter for the Java compiler, without leading "-"
        Returns:
        the created artifacts
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException - in case that artifact creation fails
      • javac

        public static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> javac​(net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> source,
                                                                                                                                                       net.ssehub.easy.instantiation.core.model.artifactModel.Path target,
                                                                                                                                                       java.util.Map<java.lang.String,​java.lang.Object> other)
                                                                                                                                                throws net.ssehub.easy.instantiation.core.model.common.VilException
        Compiles a source path to a target path.
        Parameters:
        source - the source artifacts
        target - the target path
        other - the other parameter for the Java compiler, without leading "-"
        Returns:
        the created artifacts
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException - in case that artifact creation fails
      • getJavaCompiler

        private static javax.tools.JavaCompiler getJavaCompiler()
        Gets the Java™ programming language compiler provided with this platform.
        If Java cannot find the compiler, this method will also try to use the JAVA_HOME variable to detect the compiler.
        Returns:
        The Java™ programming language compiler or null if the compiler could not be found.