Package com.sun.tools.ws.wscompile
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOptions.Targetstatic classOptions.WeAreDoneUsed to signal that we've finished processing.
-
Field Summary
Fields Modifier and Type Field Description StringclasspathintcompatibilityModethis switch determines how carefully the compiler will follow the compatibility rules in the spec.booleandebugbooleandebugMode-Xdebug - gives complete stack traceFiledestDir-dbooleandisableXmlSecurityIf true XML security features when parsing XML documents will be disabled.Stringencoding-encodingstatic intEXTENSIONloosely follow the compatibility rules and allow the use of vendor binding extensionsFilerfilerThe filer that can use used to write out the generated filesList<String>javacOptions-javacOptionsbooleankeep-keepbooleannocompile-Xnocompilebooleanquiet- quiteFilesourceDir-sstatic intSTRICTType of input schema language.Options.Targettargetbooleanverbose-verbose
-
Constructor Summary
Constructors Constructor Description Options()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddFile(String arg)Adds a file from the argumevoidaddGeneratedFile(File file)Deprecated.UseaddGeneratedFile(javax.tools.FileObject)instead.voidaddGeneratedFile(FileObject fo)Remember info on generated file so that it can be removed later, if appropriate.voiddeleteGeneratedFiles()Delete all the generated source files made during the execution of this environment (those that have been registered with the "addGeneratedFile" method).protected voiddisableXmlSecurity()static URLfileToURL(File file)Returns the directory or JAR file URL corresponding to the specified local file name.ClassLoadergetClassLoader()Get a URLClassLoader from using the classpathIterable<File>getGeneratedFiles()Return all the generated files and its types.List<String>getJavacOptions(List<String> existingOptions, WsimportListener listener)booleanisExtensionMode()voidparseArguments(String[] args)Parses arguments and fill fields of this object.protected intparseArguments(String[] args, int i)Parses an optionargs[i]and return the number of tokens consumed.static URL[]pathToURLs(String path)Utility method for converting a search path string to an array of directory and JAR file URLs.voidremoveGeneratedFiles()Remove generated filesStringrequireArgument(String optionName, String[] args, int i)Obtains an operand and reports an error if it's not there.
-
-
-
Field Detail
-
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
-
nocompile
public boolean nocompile
-Xnocompile
-
disableXmlSecurity
public boolean 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 theSCHEMA_XXXstrictly follow the compatibility rules specified in JAXWS spec- See Also:
- Constant Field Values
-
EXTENSION
public static final int EXTENSION
loosely follow the compatibility rules and allow the use of vendor binding extensions- See Also:
- Constant Field Values
-
compatibilityMode
public int compatibilityMode
this switch determines how carefully the compiler will follow the compatibility rules in the spec. EitherSTRICTorEXTENSION.
-
debug
public boolean debug
-
debugMode
public boolean debugMode
-Xdebug - gives complete stack trace
-
-
Method Detail
-
isExtensionMode
public boolean isExtensionMode()
-
addGeneratedFile
@Deprecated public void addGeneratedFile(File file)
Deprecated.UseaddGeneratedFile(javax.tools.FileObject)instead.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 optionargs[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
-
-