Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1451

Clean up compiler API and use classloading infrastructure

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Commons Compiler 1.0.0
    • Fix Version/s: Commons Compiler 2.0.0
    • Component/s: Commons
    • Labels:
      None

      Description

      The current interface of the commons compiler is unnecessary complicated and does not use all of the features of the commons classloading infrastructure.

      We can:

      • remove the CompilerEnvironment interface - this can be handled internally
      • remove the ClassWriter interface - we have the ClassLoaderWriter interface in the commons classloader
      • change the options interface to extend a map - this allows us to add new options without changing interfaces/api
      • the compile unit interface can be changed to
        CompileUnit {
        InputStream getSource();
        String getMainTypeName();
        }
        This simplifies the integration with the rest of sling which is resource based.
        The JavaCompiler interface then just takes an array of compile units, an error handler and the options

        Attachments

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              cziegeler Carsten Ziegeler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: