Class AbstractCompile

java.lang.Object
build.spin.module.java.AbstractCompile
All Implemented Interfaces:
build.spin.Task<build.base.io.PathSet>
Direct Known Subclasses:
Java25CompilerPlugin.Compile, Java8CompilerPlugin.Compile

public abstract class AbstractCompile extends Object implements build.spin.Task<build.base.io.PathSet>
An abstract Task to compile Java Source Code using the Java Platform javac command.
Since:
Oct-2019
Author:
brian.oliver
  • Nested Class Summary

    Nested classes/interfaces inherited from interface build.spin.Task

    build.spin.Task.Pattern
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected build.base.io.PathSet
    compile(build.base.io.PathSet sourceCode, build.spawn.jdk.option.ModulePath modulePath, build.spawn.jdk.option.ClassPath classPath, Path buildPath, Path targetPath)
    Compiles the source code in the provided PathSet into the specified build Path.
    Stream<build.spin.Reference>
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface build.spin.Task

    execute
  • Constructor Details

    • AbstractCompile

      public AbstractCompile()
  • Method Details

    • dependencies

      public Stream<build.spin.Reference> dependencies()
      Specified by:
      dependencies in interface build.spin.Task<build.base.io.PathSet>
    • compile

      protected build.base.io.PathSet compile(build.base.io.PathSet sourceCode, build.spawn.jdk.option.ModulePath modulePath, build.spawn.jdk.option.ClassPath classPath, Path buildPath, Path targetPath) throws Exception
      Compiles the source code in the provided PathSet into the specified build Path.
      Parameters:
      sourceCode - the source code
      modulePath - the ModulePath (empty for non-modular projects)
      classPath - the ClassPath
      buildPath - the build Path (.build)
      targetPath - the path in which to place the compiled classes
      Returns:
      the PathSet containing the compiled classes
      Throws:
      Exception - should compilation fail