Class AbstractCompiler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String classpath
      The classpath to be used for compilation
      protected java.lang.String destDir
      The name of the directory to contain the resulting object program file
      protected java.lang.String encoding
      The encoding of the source program or null to use the platform's default encoding
      protected java.io.InputStream errors
      The input stream to output compilation errors
      protected java.util.ArrayList fileList
      The source program filenames
      protected java.lang.String srcDir
      The name of the directory containing the source program file
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void addFile​(java.lang.String file)
      Add the name of the file containing the source program to the file list
      protected java.util.List fillArguments​(java.util.List arguments)
      Fill the arguments taken by the Java compiler
      java.util.List getErrors()
      Return the list of errors generated by this compilation
      protected abstract java.util.List parseStream​(java.io.BufferedReader errors)
      Parse the compiler error stream to produce a list of CompilerErrors
      void setClasspath​(java.lang.String classpath)
      Set the classpath to be used for this compilation
      void setDestination​(java.lang.String destDir)
      Set the name of the directory to contain the resulting object program file
      void setEncoding​(java.lang.String encoding)
      Set the encoding of the input source file or null to use the platform's default encoding
      void setSource​(java.lang.String srcDir)
      Set the name of the directory containing the source program file
      protected java.lang.String[] toStringArray​(java.util.List arguments)
      Copy arguments to a string array
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.axis.components.compiler.Compiler

        compile
    • Field Detail

      • fileList

        protected java.util.ArrayList fileList
        The source program filenames
      • srcDir

        protected java.lang.String srcDir
        The name of the directory containing the source program file
      • destDir

        protected java.lang.String destDir
        The name of the directory to contain the resulting object program file
      • classpath

        protected java.lang.String classpath
        The classpath to be used for compilation
      • encoding

        protected java.lang.String encoding
        The encoding of the source program or null to use the platform's default encoding
      • errors

        protected java.io.InputStream errors
        The input stream to output compilation errors
    • Constructor Detail

      • AbstractCompiler

        public AbstractCompiler()
    • Method Detail

      • addFile

        public void addFile​(java.lang.String file)
        Add the name of the file containing the source program to the file list
        Specified by:
        addFile in interface Compiler
        Parameters:
        file - The name of the file containing the source program
      • setSource

        public void setSource​(java.lang.String srcDir)
        Set the name of the directory containing the source program file
        Specified by:
        setSource in interface Compiler
        Parameters:
        srcDir - The name of the directory containing the source program file
      • setDestination

        public void setDestination​(java.lang.String destDir)
        Set the name of the directory to contain the resulting object program file
        Specified by:
        setDestination in interface Compiler
        Parameters:
        destDir - The name of the directory to contain the resulting object program file
      • setClasspath

        public void setClasspath​(java.lang.String classpath)
        Set the classpath to be used for this compilation
        Specified by:
        setClasspath in interface Compiler
        Parameters:
        classpath - The classpath to be used for this compilation
      • setEncoding

        public void setEncoding​(java.lang.String encoding)
        Set the encoding of the input source file or null to use the platform's default encoding
        Specified by:
        setEncoding in interface Compiler
        Parameters:
        encoding - The encoding of the input source file or null to use the platform's default encoding
      • getErrors

        public java.util.List getErrors()
                                 throws java.io.IOException
        Return the list of errors generated by this compilation
        Specified by:
        getErrors in interface Compiler
        Returns:
        The list of errors generated by this compilation
        Throws:
        java.io.IOException - If an error occurs during message collection
      • parseStream

        protected abstract java.util.List parseStream​(java.io.BufferedReader errors)
                                               throws java.io.IOException
        Parse the compiler error stream to produce a list of CompilerErrors
        Parameters:
        errors - The error stream
        Returns:
        The list of compiler error messages
        Throws:
        java.io.IOException - If an error occurs during message collection
      • fillArguments

        protected java.util.List fillArguments​(java.util.List arguments)
        Fill the arguments taken by the Java compiler
        Parameters:
        arguments - The list of compilation arguments
        Returns:
        The prepared list of compilation arguments
      • toStringArray

        protected java.lang.String[] toStringArray​(java.util.List arguments)
        Copy arguments to a string array
        Parameters:
        arguments - The compiler arguments
        Returns:
        A string array containing compilation arguments