coldbox.system.core.javaloader

Class JavaCompiler

WEB-INF.cftags.component
        extended by coldbox.system.core.javaloader.JavaCompiler
Class Attributes:
  • output : false
  •  

    Compiles Java source dirs to an array of .jar files.

    Constructor Summary
    init([string jarDirectory='[runtime expression]'])
          Constructor.
    Method Summary
    private array addClassLoaderFiles(array options, any classLoader, array directoryArray)
         adds a set of files to the file manager from the urlclassloader.
    any compile(array directoryArray, [any classLoader], [string jarName='[runtime expression]'])
         compiles Java to bytecode, and returns a JAR.
    private any getCompiler()
    private string getJarDirectory()
    string getVersion()
         returns the version number.
    private void println(string str)
    private void setCompiler(any Compiler)
    private void setJarDirectory(string jarDirectory)
    private any throwException(string type, string message, [string detail=''])
         Throws an Exception.
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init([string jarDirectory='[runtime expression]'])

    Constructor

    Parameters:
    jarDirectory - the directory to build the .jar file in, defaults to ./tmp

    Method Detail

    addClassLoaderFiles

    private array addClassLoaderFiles(array options, any classLoader, array directoryArray)

    adds a set of files to the file manager from the urlclassloader

    Parameters:
    options - the options array
    classLoader - URLClassloader to use as the parent for compilation
    directoryArray - array of directories to compile

    compile

    public any compile(array directoryArray, [any classLoader], [string jarName='[runtime expression]'])

    compiles Java to bytecode, and returns a JAR

    Parameters:
    directoryArray - array of directories to compile
    classLoader - a optional URLClassloader to use as the parent for compilation
    jarName - The name of the jar file. Defaults to a UUID

    getCompiler

    private any getCompiler()


    getJarDirectory

    private string getJarDirectory()


    getVersion

    public string getVersion()

    returns the version number


    println

    private void println(string str)

    Parameters:
    str -

    setCompiler

    private void setCompiler(any Compiler)

    Parameters:
    Compiler

    setJarDirectory

    private void setJarDirectory(string jarDirectory)

    Parameters:
    jarDirectory

    throwException

    private any throwException(string type, string message, [string detail=''])

    Throws an Exception

    Parameters:
    type - The type of exception
    message - The message to accompany the exception
    detail - The detail message for the exception