You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/05/31 04:53:52 UTC

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler CommandLineCompiler.java Compiler.java

remm        2002/05/30 19:53:52

  Modified:    jasper2/src/share/org/apache/jasper JspEngineContext.java
               jasper2/src/share/org/apache/jasper/compiler
                        CommandLineCompiler.java Compiler.java
  Log:
  - Refactoring part 2.
  - Remove the need for JavaCompiler (fake compiler which unique responsability
    was to do side effects on the other objects).
  - Remove Mangler (same thing). Most of the mangler methods are now in the
    compilation context. Useless methods will be cleared in the part 4 of the refactoring.
  - Remove the need for the compiler classes, which are fully replaced by Ant
    (additional options will be added to allow to configure the Ant compiler).
  
  Revision  Changes    Path
  1.9       +3 -4      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java
  
  Index: JspEngineContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JspEngineContext.java	30 May 2002 06:14:41 -0000	1.8
  +++ JspEngineContext.java	31 May 2002 02:53:52 -0000	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java,v 1.8 2002/05/30 06:14:41 remm Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/05/30 06:14:41 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspEngineContext.java,v 1.9 2002/05/31 02:53:52 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/05/31 02:53:52 $
    *
    * ====================================================================
    * 
  @@ -87,7 +87,6 @@
   import org.apache.jasper.compiler.JspRuntimeContext;
   import org.apache.jasper.compiler.ServletWriter;
   import org.apache.jasper.compiler.Compiler;
  -import org.apache.jasper.compiler.JavaCompiler;
   import org.apache.jasper.logging.Logger;
   import org.apache.jasper.servlet.JasperLoader;
   import org.apache.jasper.servlet.JspServletWrapper;
  
  
  
  1.4       +4 -5      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/CommandLineCompiler.java
  
  Index: CommandLineCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/CommandLineCompiler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CommandLineCompiler.java	24 Apr 2002 02:21:05 -0000	1.3
  +++ CommandLineCompiler.java	31 May 2002 02:53:52 -0000	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/CommandLineCompiler.java,v 1.3 2002/04/24 02:21:05 kinman Exp $
  - * $Revision: 1.3 $
  - * $Date: 2002/04/24 02:21:05 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/CommandLineCompiler.java,v 1.4 2002/05/31 02:53:52 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2002/05/31 02:53:52 $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -71,7 +71,7 @@
    * Overrides some methods so that we get the desired effects.
    *@author Danno Ferrin
    */
  -public class CommandLineCompiler extends Compiler implements Mangler {
  +public class CommandLineCompiler extends Compiler /*implements Mangler*/ {
   
       String javaFileName;
       String classFileName;
  @@ -88,7 +88,6 @@
           outputDir =  ctxt.getOptions().getScratchDir().getAbsolutePath();
   	packageName = ctxt.getServletPackageName();
   	pkgName = packageName;
  -        setMangler(this);
   
           className = getBaseClassName();
           // yes this is kind of messed up ... but it works
  
  
  
  1.9       +5 -22     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Compiler.java	30 May 2002 06:14:41 -0000	1.8
  +++ Compiler.java	31 May 2002 02:53:52 -0000	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v 1.8 2002/05/30 06:14:41 remm Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/05/30 06:14:41 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v 1.9 2002/05/31 02:53:52 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/05/31 02:53:52 $
    *
    * ====================================================================
    * 
  @@ -109,7 +109,6 @@
       // ----------------------------------------------------- Instance Variables
   
   
  -    protected Mangler mangler;
       protected JspCompilationContext ctxt;
   
       private ErrorDispatcher errDispatcher;
  @@ -328,22 +327,6 @@
   
       
       /**
  -     * Set java compiler info
  -     */
  -    public void setJavaCompiler(JavaCompiler javac) {
  -    }
  -
  -
  -    /**
  -     * Set Mangler which will be used as part of compile().
  -     */
  -    public void setMangler(Mangler mangler) {
  -        //this.mangler = mangler;
  -        //ctxt.setServletJavaFileName(mangler.getJavaFileName());
  -    }
  -
  -
  -    /**
        * Gets the error dispatcher.
        */
       public ErrorDispatcher getErrorDispatcher() {
  @@ -407,7 +390,7 @@
        */
       public void removeGeneratedFiles() {
           try {
  -            String classFileName = mangler.getClassFileName();
  +            String classFileName = ctxt.getServletClassName();
               if (classFileName != null) {
                   File classFile = new File(classFileName);
                   classFile.delete();
  @@ -416,7 +399,7 @@
               // Remove as much as possible, ignore possible exceptions
           }
           try {
  -            String javaFileName = mangler.getJavaFileName();
  +            String javaFileName = ctxt.getServletJavaFileName();
               if (javaFileName != null) {
                   File javaFile = new File(javaFileName);
                   javaFile.delete();
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>