Class XJCBase

  • All Implemented Interfaces:
    java.lang.Cloneable, org.apache.tools.ant.types.selectors.SelectorContainer
    Direct Known Subclasses:
    XJC2Task

    public class XJCBase
    extends org.apache.tools.ant.taskdefs.MatchingTask
    Author:
    Yan GAO (gaoyan.gao@oracle.com)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Options options  
      • Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask

        fileset
      • Fields inherited from class org.apache.tools.ant.Task

        target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • Constructor Summary

      Constructors 
      Constructor Description
      XJCBase()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addConfiguredBinding​(org.apache.tools.ant.types.FileSet fs)
      Nested <binding> element.
      void addConfiguredDepends​(org.apache.tools.ant.types.FileSet fs)
      Nested <depends> element.
      void addConfiguredProduces​(org.apache.tools.ant.types.FileSet fs)
      Nested <produces> element.
      void addConfiguredSchema​(org.apache.tools.ant.types.FileSet fs)
      Nested <schema> element.
      void addConfiguredXMLCatalog​(org.apache.tools.ant.types.XMLCatalog xmlCatalog)
      Add the catalog to our internal catalog
      org.apache.tools.ant.types.Commandline.Argument createArg()  
      org.apache.tools.ant.types.Path createClasspath()
      Nested <classpath> element.
      org.apache.tools.ant.types.Commandline.Argument createJvmarg()  
      void execute()
      Runs XJC.
      java.lang.String getAddexports()  
      java.lang.String getAddmodules()  
      java.lang.String getAddopens()  
      java.lang.String getAddreads()  
      java.io.File getCatalog()  
      java.io.File getDestdir()  
      java.lang.String getEncoding()  
      boolean getExtension()  
      boolean getFork()
      Gets the "fork" flag.
      boolean getHeader()  
      java.lang.String getLimitmodules()  
      org.apache.tools.ant.types.Path getModulepath()  
      java.lang.String getPackage()  
      java.lang.String getPatchmodule()  
      boolean getReadOnly()  
      boolean getRemoveOldOutput()  
      java.lang.String getSpecTarget()  
      org.apache.tools.ant.types.Path getUpgrademodulepath()  
      boolean getVerbose()  
      void setAddexports​(java.lang.String aes)  
      void setAddmodules​(java.lang.String ams)  
      void setAddopens​(java.lang.String aos)  
      void setAddreads​(java.lang.String ars)  
      void setBinding​(java.lang.String binding)
      External binding file.
      void setCatalog​(java.io.File catalog)
      Adds a new catalog file.
      void setClasspath​(org.apache.tools.ant.types.Path cp)
      Nested <classpath> element.
      void setClasspathRef​(org.apache.tools.ant.types.Reference r)  
      void setDestdir​(java.io.File dir)
      Sets the directory to produce generated source files.
      void setEncoding​(java.lang.String encoding)  
      void setExtension​(boolean flg)
      Controls whether the compiler will run in the strict conformance mode (flg=false) or the extension mode (flg=true)
      void setFailonerror​(boolean value)
      Mostly for our SQE teams and not to be advertized.
      void setFork​(boolean fork)
      Sets the "fork" flag.
      void setHeader​(boolean flg)
      Controls whether the file header comment is generated or not.
      void setLanguage​(java.lang.String language)
      Sets the schema language.
      void setLimitmodules​(java.lang.String lms)  
      void setModulepath​(org.apache.tools.ant.types.Path mp)  
      void setPackage​(java.lang.String pkg)
      Sets the package name of the generated code.
      void setPatchmodule​(java.lang.String pms)  
      void setReadonly​(boolean flg)
      Controls whether files should be generated in read-only mode or not
      void setRemoveOldOutput​(boolean roo)
      "removeOldOutput" attribute.
      void setSchema​(java.lang.String schema)
      Parses the schema attribute.
      void setStackSize​(java.lang.String ss)
      Deprecated.
      not much need for JAXB2, as we now use much less stack.
      void setTarget​(java.lang.String version)
      Sets the target version of the compilation
      protected org.apache.tools.ant.types.CommandlineJava setupCommand()
      Set up command line to invoke.
      void setUpgrademodulepath​(org.apache.tools.ant.types.Path ump)  
      void setXexplicitAnnotation​(boolean flg)  
      • Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask

        add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
      • Methods inherited from class org.apache.tools.ant.Task

        bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        clone, getDescription, getLocation, getProject, setDescription, setLocation
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • options

        public final Options options
    • Constructor Detail

      • XJCBase

        public XJCBase()
    • Method Detail

      • setModulepath

        public void setModulepath​(org.apache.tools.ant.types.Path mp)
      • getModulepath

        public org.apache.tools.ant.types.Path getModulepath()
      • setUpgrademodulepath

        public void setUpgrademodulepath​(org.apache.tools.ant.types.Path ump)
      • getUpgrademodulepath

        public org.apache.tools.ant.types.Path getUpgrademodulepath()
      • setAddmodules

        public void setAddmodules​(java.lang.String ams)
      • getAddmodules

        public java.lang.String getAddmodules()
      • setLimitmodules

        public void setLimitmodules​(java.lang.String lms)
      • getLimitmodules

        public java.lang.String getLimitmodules()
      • setAddreads

        public void setAddreads​(java.lang.String ars)
      • getAddreads

        public java.lang.String getAddreads()
      • setAddexports

        public void setAddexports​(java.lang.String aes)
      • getAddexports

        public java.lang.String getAddexports()
      • setPatchmodule

        public void setPatchmodule​(java.lang.String pms)
      • getPatchmodule

        public java.lang.String getPatchmodule()
      • setAddopens

        public void setAddopens​(java.lang.String aos)
      • getAddopens

        public java.lang.String getAddopens()
      • getFork

        public boolean getFork()
        Gets the "fork" flag.
        Returns:
        true if execution should be done in forked JVM, false otherwise.
      • setFork

        public void setFork​(boolean fork)
        Sets the "fork" flag.
        Parameters:
        fork - true to run execution in a forked JVM.
      • setSchema

        public void setSchema​(java.lang.String schema)
        Parses the schema attribute. This attribute will be used when there is only one schema.
        Parameters:
        schema - A file name (can be relative to base dir), or an URL (must be absolute).
      • addConfiguredSchema

        public void addConfiguredSchema​(org.apache.tools.ant.types.FileSet fs)
        Nested <schema> element.
      • setClasspath

        public void setClasspath​(org.apache.tools.ant.types.Path cp)
        Nested <classpath> element.
      • createClasspath

        public org.apache.tools.ant.types.Path createClasspath()
        Nested <classpath> element.
      • setClasspathRef

        public void setClasspathRef​(org.apache.tools.ant.types.Reference r)
      • setLanguage

        public void setLanguage​(java.lang.String language)
        Sets the schema language.
      • setBinding

        public void setBinding​(java.lang.String binding)
        External binding file.
      • addConfiguredBinding

        public void addConfiguredBinding​(org.apache.tools.ant.types.FileSet fs)
        Nested <binding> element.
      • setPackage

        public void setPackage​(java.lang.String pkg)
        Sets the package name of the generated code.
      • getPackage

        public java.lang.String getPackage()
      • setCatalog

        public void setCatalog​(java.io.File catalog)
        Adds a new catalog file.
      • getCatalog

        public java.io.File getCatalog()
      • setFailonerror

        public void setFailonerror​(boolean value)
        Mostly for our SQE teams and not to be advertized.
      • setStackSize

        public void setStackSize​(java.lang.String ss)
        Deprecated.
        not much need for JAXB2, as we now use much less stack.
        Sets the stack size of the XJC invocation.
      • addConfiguredXMLCatalog

        public void addConfiguredXMLCatalog​(org.apache.tools.ant.types.XMLCatalog xmlCatalog)
        Add the catalog to our internal catalog
        Parameters:
        xmlCatalog - the XMLCatalog instance to use to look up DTDs
      • setReadonly

        public void setReadonly​(boolean flg)
        Controls whether files should be generated in read-only mode or not
      • getReadOnly

        public boolean getReadOnly()
      • setHeader

        public void setHeader​(boolean flg)
        Controls whether the file header comment is generated or not.
      • getHeader

        public boolean getHeader()
      • setXexplicitAnnotation

        public void setXexplicitAnnotation​(boolean flg)
        See Also:
        Options.runtime14
      • setExtension

        public void setExtension​(boolean flg)
        Controls whether the compiler will run in the strict conformance mode (flg=false) or the extension mode (flg=true)
      • getExtension

        public boolean getExtension()
      • setTarget

        public void setTarget​(java.lang.String version)
        Sets the target version of the compilation
      • getSpecTarget

        public java.lang.String getSpecTarget()
      • getVerbose

        public boolean getVerbose()
      • setDestdir

        public void setDestdir​(java.io.File dir)
        Sets the directory to produce generated source files.
      • getDestdir

        public java.io.File getDestdir()
      • setEncoding

        public void setEncoding​(java.lang.String encoding)
      • getEncoding

        public java.lang.String getEncoding()
      • addConfiguredDepends

        public void addConfiguredDepends​(org.apache.tools.ant.types.FileSet fs)
        Nested <depends> element.
      • addConfiguredProduces

        public void addConfiguredProduces​(org.apache.tools.ant.types.FileSet fs)
        Nested <produces> element.
      • setRemoveOldOutput

        public void setRemoveOldOutput​(boolean roo)
        "removeOldOutput" attribute.
      • getRemoveOldOutput

        public boolean getRemoveOldOutput()
      • createArg

        public org.apache.tools.ant.types.Commandline.Argument createArg()
      • createJvmarg

        public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
      • setupCommand

        protected org.apache.tools.ant.types.CommandlineJava setupCommand()
        Set up command line to invoke.
        Returns:
        ready to run command line
      • execute

        public void execute()
                     throws org.apache.tools.ant.BuildException
        Runs XJC.
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException