org.tp23.jasper.compiler
Class JspCompiler
java.lang.Object
|
+--org.tp23.jasper.compiler.Compiler
|
+--org.tp23.jasper.compiler.JspCompiler
- All Implemented Interfaces:
- Mangler
- public class JspCompiler
- extends Compiler
- implements Mangler
JspCompiler is an implementation of Compiler with a funky code
mangling and code generation scheme!
The reason that it is both a sub-class of compiler and an implementation
of mangler is because the isOutDated method that is overridden and the
name mangulation both depend on the actual existance of other class and
java files. I.e. the value of a mangled name is a function of both the
name to be mangled and also of the state of the scratchdir.
- Author:
- Anil K. Vijendran, Paul Hinds
Field Summary |
static java.lang.String[] |
keywords
|
Method Summary |
java.lang.String |
getClassFileName()
The full name of the .class file ( without version number) |
java.lang.String |
getClassName()
The class name ( without package ) of the
generated servlet, including the version number |
java.lang.String |
getJavaFileName()
The full name of the .java file, including
version number ( based on className and outputDir ) |
java.lang.String |
getPackageName()
The package name. |
static java.lang.String |
getPrefix(java.lang.String pathName)
|
java.lang.String |
getRealClassName()
Return the real class name for the JSP, including package and
version. |
boolean |
isOutDated()
Determines whether the current JSP class is older than the JSP file
from whence it came |
static java.lang.String |
mangleName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keywords
public static java.lang.String[] keywords
JspCompiler
public JspCompiler(JspCompilationContext ctxt)
throws JasperException
getRealClassName
public final java.lang.String getRealClassName()
- Return the real class name for the JSP, including package and
version.
This method is called when the server is started and a .class file
is found from a previous compile or when the .class file is older,
to find next version.
getClassName
public final java.lang.String getClassName()
- Description copied from interface:
Mangler
- The class name ( without package ) of the
generated servlet, including the version number
- Specified by:
getClassName
in interface Mangler
getJavaFileName
public final java.lang.String getJavaFileName()
- Description copied from interface:
Mangler
- The full name of the .java file, including
version number ( based on className and outputDir )
- Specified by:
getJavaFileName
in interface Mangler
getClassFileName
public final java.lang.String getClassFileName()
- Description copied from interface:
Mangler
- The full name of the .class file ( without version number)
- Specified by:
getClassFileName
in interface Mangler
getPackageName
public final java.lang.String getPackageName()
- Description copied from interface:
Mangler
- The package name. It is based on the .jsp path, with
all unsafe components escaped.
- Specified by:
getPackageName
in interface Mangler
mangleName
public static final java.lang.String mangleName(java.lang.String name)
getPrefix
public static final java.lang.String getPrefix(java.lang.String pathName)
isOutDated
public boolean isOutDated()
- Determines whether the current JSP class is older than the JSP file
from whence it came
- Overrides:
isOutDated
in class Compiler