Package org.apache.tools.ant.taskdefs.optional.jsp.compilers

# Class JspCompilerAdapterFactory

java.lang.Object
org.apache.tools.ant.taskdefs.optional.jsp.compilers.JspCompilerAdapterFactory

public final class JspCompilerAdapterFactory extends Object
Creates the necessary compiler adapter, given basic criteria.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static JspCompilerAdapter`
  `getCompiler​(String compilerType, Task task)`
  Based on the parameter passed in, this method creates the necessary factory desired.
  `static JspCompilerAdapter`
  `getCompiler​(String compilerType, Task task, AntClassLoader loader)`
  Based on the parameter passed in, this method creates the necessary factory desired.

  ### Methods inherited from class java.lang.Object

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

- ## Method Details

  - ### getCompiler

    public static JspCompilerAdapter getCompiler​(String compilerType, Task task) throws BuildException
    Based on the parameter passed in, this method creates the necessary factory desired. The current mapping for compiler names are as follows:
    - jasper = jasper compiler (the default)
    - a fully qualified classname = the name of a jsp compiler adapter
    Parameters:
      `compilerType` - either the name of the desired compiler, or the full classname of the compiler's adapter.
      `task` - a task to log through.
    Returns:
      the compiler
    Throws:
      `BuildException` - if the compiler type could not be resolved into a compiler adapter.

  - ### getCompiler

    public static JspCompilerAdapter getCompiler​(String compilerType, Task task, AntClassLoader loader) throws BuildException
    Based on the parameter passed in, this method creates the necessary factory desired. The current mapping for compiler names are as follows:
    - jasper = jasper compiler (the default)
    - a fully qualified classname = the name of a jsp compiler adapter
    Parameters:
      `compilerType` - either the name of the desired compiler, or the full classname of the compiler's adapter.
      `task` - a task to log through.
      `loader` - AntClassLoader with which the compiler should be loaded
    Returns:
      the compiler
    Throws:
      `BuildException` - if the compiler type could not be resolved into a compiler adapter.