Interface IIncrementalCompileDriver

  • All Known Implementing Classes:
    BasicIncrementalCompileDriver

    public interface IIncrementalCompileDriver
    Facilitates incremental compilation and hot swap debugging of Manifold resource files.

    The implementation of this interface is provided to Manifold during javac compilation. It is provided by name (typically) using a generated, temporary Java source file annotated with IncrementalCompile. Typically an IDE hosting an incremental compiler using Javac will keep track of the set of changed resource files needing compilation and generate this temporary Java class. Thus an implementor of this interface acts as a mediator so that:

    • the incremental compiler of the IDE can communicate the set of changed resource files to Manifold (via getChangedFiles())
    • Manifold can add the types associated with the resource files to javac's queue of types to be compiled
    • Manifold can communicate back to the IDE the set of types via IjChangedResourceFiles#getTypesToFile()
    • Method Detail

      • isIncremental

        boolean isIncremental()
        Is the compilation incremental, or is this a rebuild (full build)?
        Returns:
        true if an incremental build, otherwise false indicating a rebuild.
      • getChangedFiles

        Collection<File> getChangedFiles()
        Manifold's javac plugin calls this method after the ANALYZE phase of the class annotated with this method. Typically the class annotated with this method is temporary and generated on the fly and within the IDE hosting the compiler. The IDE keeps track of resource files that have changed. Returns all changed resources files (skips Java files); Manifold will figure out whether or not each resource file maps to a Type Manifold and, if so, finds the type[s] produced from the file. In turn the javac plugin associates types corresponding with the file via IjChangedResourceFiles#getTypesToFile().
        Returns:
        The resource files that have changed since the last make/build.