Class Options

java.lang.Object
com.sun.tools.ws.wscompile.Options
Direct Known Subclasses:
WsgenOptions, WsimportOptions

public class Options extends Object
Provide common jaxws tool options.
Author:
Vivek Pandey
  • Field Details

    • classNameReplacer

      protected final Map<String,String> classNameReplacer
    • verbose

      public boolean verbose
      -verbose
    • quiet

      public boolean quiet
      - quite
    • keep

      public boolean keep
      -keep
    • destDir

      public File destDir
      -d
    • sourceDir

      public File sourceDir
      -s
    • filer

      public Filer filer
      The filer that can use used to write out the generated files
    • encoding

      public String encoding
      -encoding
    • classpath

      public String classpath
    • javacOptions

      public List<String> javacOptions
      -javacOptions
      Since:
      2.2.9
    • nocompile

      public boolean nocompile
      -Xnocompile
    • disableXmlSecurity

      public boolean disableXmlSecurity
      -disableXmlSecurity

      If true XML security features when parsing XML documents will be disabled. The default value is false. Boolean

      Since:
      2.2.9
    • target

      public Options.Target target
    • STRICT

      public static final int STRICT
      Type of input schema language. One of the SCHEMA_XXX strictly follow the compatibility rules specified in JAXWS spec
      See Also:
    • EXTENSION

      public static final int EXTENSION
      loosely follow the compatibility rules and allow the use of vendor binding extensions
      See Also:
    • compatibilityMode

      public int compatibilityMode
      this switch determines how carefully the compiler will follow the compatibility rules in the spec. Either STRICT or EXTENSION.
    • debug

      public boolean debug
    • debugMode

      public boolean debugMode
      -Xdebug - gives complete stack trace
  • Constructor Details

    • Options

      public Options()
      Default constructor.
  • Method Details

    • isExtensionMode

      public boolean isExtensionMode()
    • addGeneratedFile

      @Deprecated public void addGeneratedFile(File file)
      Remember info on generated source file so that it can be removed later, if appropriate.
      Parameters:
      file - generated File
    • addGeneratedFile

      public void addGeneratedFile(FileObject fo)
      Remember info on generated file so that it can be removed later, if appropriate.
      Parameters:
      fo - generated FileObject
    • removeGeneratedFiles

      public void removeGeneratedFiles()
      Remove generated files
    • getGeneratedFiles

      public Iterable<File> getGeneratedFiles()
      Return all the generated files and its types.
    • deleteGeneratedFiles

      public void deleteGeneratedFiles()
      Delete all the generated source files made during the execution of this environment (those that have been registered with the "addGeneratedFile" method).
    • parseArguments

      public void parseArguments(String[] args) throws BadCommandLineException
      Parses arguments and fill fields of this object.
      Throws:
      BadCommandLineException - thrown when there's a problem in the command-line arguments
    • addFile

      protected void addFile(String arg) throws BadCommandLineException
      Adds a file from the argume
      Parameters:
      arg - a file, could be a wsdl or xsd or a Class
      Throws:
      BadCommandLineException
    • parseArguments

      protected int parseArguments(String[] args, int i) throws BadCommandLineException
      Parses an option args[i] and return the number of tokens consumed.
      Returns:
      0 if the argument is not understood. Returning 0 will let the caller report an error.
      Throws:
      BadCommandLineException - If the callee wants to provide a custom message for an error.
    • disableXmlSecurity

      protected void disableXmlSecurity()
    • requireArgument

      public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException
      Obtains an operand and reports an error if it's not there.
      Throws:
      BadCommandLineException
    • getJavacOptions

      public List<String> getJavacOptions(List<String> existingOptions, WsimportListener listener)
    • getClassLoader

      public ClassLoader getClassLoader()
      Get a URLClassLoader from using the classpath
    • pathToURLs

      public static URL[] pathToURLs(String path)
      Utility method for converting a search path string to an array of directory and JAR file URLs.
      Parameters:
      path - the search path string
      Returns:
      the resulting array of directory and JAR file URLs
    • fileToURL

      public static URL fileToURL(File file)
      Returns the directory or JAR file URL corresponding to the specified local file name.
      Parameters:
      file - the File object
      Returns:
      the resulting directory or JAR file URL, or null if unknown