Package com.sun.tools.ws.ant
Class WsGen2
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
com.sun.tools.ws.ant.WsGen2
- All Implemented Interfaces:
Cloneable,org.apache.tools.ant.types.selectors.SelectorContainer
public class WsGen2
extends org.apache.tools.ant.taskdefs.MatchingTask
- Author:
- lukas
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.tools.ant.types.Path********************** -classpath option ************************protected boolean***************** -inlineSchemas option *********************Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
filesetFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.tools.ant.types.PathCreates a nested classpath element.com.sun.tools.ws.ant.WsGenBase.ExternalMetadataorg.apache.tools.ant.types.Commandline.ArgumentAdds Javac argument.org.apache.tools.ant.types.Commandline.ArgumentAdds a JVM argument.voidexecute()Called by the project to let the task do it's work *protected final voidLet the task do it's work.org.apache.tools.ant.types.PathGets the classpath.org.apache.tools.ant.types.PathgetCP()Gets the classpath.booleangetDebug()Gets the debug flag.Gets the base directory to output generated class.booleanGets the "disableXmlSecurity" flag.Gets the encoding for generated source java files.booleanGets the "extension" flag.booleangetFork()Gets the "fork" flag.booleanGets the genWsdl flag.booleanGets whether or not the ant classpath is to be included in the task's classpath.booleanGets whether or not the java runtime should be included in this task's classpath.booleanGets the "inlineSchemas" flag.org.apache.tools.ant.types.CommandlinebooleangetKeep()Gets the "keep" flag.org.apache.tools.ant.types.PathGets the portName.Gets the protocol.Gets the directory for non-class generated files.getSei()Gets the serviceName.Gets the directory to place generated source java files.org.apache.tools.ant.types.PathbooleanGets the "verbose" flag.booleanbooleanbooleanprotected booleanrunInVm(String[] arguments, OutputStream out) Used to call the tool directly using API.voidsetAddexports(String aes) voidsetAddmodules(String ams) voidsetAddopens(String aos) voidsetAddreads(String ars) voidsetClasspath(org.apache.tools.ant.types.Path classpath) Set the classpath to be used for this compilation.voidsetClasspathRef(org.apache.tools.ant.types.Reference r) Adds a reference to a CLASSPATH defined elsewhere.voidsetCP(org.apache.tools.ant.types.Path classpath) Set the classpath to be used for this compilation.voidsetDebug(boolean debug) Sets the debug flag.voidsetDestdir(File base) Sets the base directory to output generated class.voidsetDisableXmlSecurity(boolean disableXmlSecurity) Sets the "disableXmlSecurity" flag.voidsetEncoding(String encoding) Sets the encoding for generated source java files.voidsetExtension(boolean extension) Sets the "extension" flag.voidsetFailonerror(boolean value) Mostly for our SQE teams and not to be advertised.voidsetFork(boolean fork) Sets the "fork" flag.voidsetGenwsdl(boolean genWsdl) Sets the genWsdl flag.voidsetIncludeantruntime(boolean include) Include ant's own classpath in this task's classpath?voidsetIncludejavaruntime(boolean include) Sets whether or not to include the java runtime libraries to this task's classpath.voidsetInlineSchemas(boolean inlineSchemas) Sets the "inlineSchemas" flag.voidsetKeep(boolean keep) Sets the "keep" flag.voidsetLimitmodules(String lms) voidsetModulepath(org.apache.tools.ant.types.Path mp) voidsetPatchmodule(String pms) voidsetPortname(String name) Sets the serviceName.voidsetProtocol(String protocol) Sets the protocol.voidsetResourcedestdir(File resourceDir) Sets the directory for non-class generated files.voidSet SEI.voidsetServicename(String name) Sets the serviceName.voidsetSourcedestdir(File sourceBase) Sets the directory to place generated source java files.protected org.apache.tools.ant.types.CommandlineJavaSet up command line to invoke.voidsetupForkCommand(String className) voidsetUpgrademodulepath(org.apache.tools.ant.types.Path ump) voidsetVerbose(boolean verbose) Sets the "verbose" flag.voidsetXnocompile(boolean xnocompile) voidsetXnosource(boolean xnocompile) 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, XsetItemsMethods 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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation
-
Field Details
-
compileClasspath
protected org.apache.tools.ant.types.Path compileClasspath********************** -classpath option ************************ -
inlineSchemas
protected boolean inlineSchemas***************** -inlineSchemas option *********************
-
-
Constructor Details
-
WsGen2
public WsGen2()Default constructor.
-
-
Method Details
-
getClasspath
public org.apache.tools.ant.types.Path getClasspath()Gets the classpath.- Returns:
- user defined classpath.
-
setClasspath
public void setClasspath(org.apache.tools.ant.types.Path classpath) Set the classpath to be used for this compilation.- Parameters:
classpath- user defined classpath.
-
createClasspath
public org.apache.tools.ant.types.Path createClasspath()Creates a nested classpath element.- Returns:
- classpath created.
-
setClasspathRef
public void setClasspathRef(org.apache.tools.ant.types.Reference r) Adds a reference to a CLASSPATH defined elsewhere.- Parameters:
r- classpath reference.
-
getCP
public org.apache.tools.ant.types.Path getCP()Gets the classpath.- Returns:
- user defined classpath.
-
setCP
public void setCP(org.apache.tools.ant.types.Path classpath) Set the classpath to be used for this compilation.- Parameters:
classpath- user defined classpath.
-
getInlineSchemas
public boolean getInlineSchemas()Gets the "inlineSchemas" flag.- Returns:
- true if schema should be inlined in a WSDL.
-
setInlineSchemas
public void setInlineSchemas(boolean inlineSchemas) Sets the "inlineSchemas" flag.- Parameters:
inlineSchemas- true to inline schema in a WSDL.
-
getResourcedestdir
Gets the directory for non-class generated files.- Returns:
- destination directory for generated resource(s).
-
setResourcedestdir
Sets the directory for non-class generated files.- Parameters:
resourceDir- destination directory for generated resource(s).
-
getGenwsdl
public boolean getGenwsdl()Gets the genWsdl flag.- Returns:
- true if WSDL should be generated.
-
setGenwsdl
public void setGenwsdl(boolean genWsdl) Sets the genWsdl flag.- Parameters:
genWsdl- true to generate a WSDL.
-
getProtocol
Gets the protocol.- Returns:
- protocol.
-
setProtocol
Sets the protocol.- Parameters:
protocol- protocol.
-
getServicename
Gets the serviceName.- Returns:
- service name.
-
setServicename
Sets the serviceName.- Parameters:
name- service name.
-
getPortname
Gets the portName.- Returns:
- port name.
-
setPortname
Sets the serviceName.- Parameters:
name- port name.
-
isXnosource
public boolean isXnosource() -
setXnosource
public void setXnosource(boolean xnocompile) -
getSei
- Returns:
- Returns the sei.
-
setSei
Set SEI.- Parameters:
endpointImplementationClass- SEI.
-
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.BuildExceptionCalled by the project to let the task do it's work *- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
runInVm
Used to call the tool directly using API.- Parameters:
arguments- arguments to be passed to the toolout- output for the tool- Returns:
- true if tool succeed
-
createExternalMetadata
public com.sun.tools.ws.ant.WsGenBase.ExternalMetadata createExternalMetadata() -
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
-
getAddmodules
-
setLimitmodules
-
getLimitmodules
-
setAddreads
-
getAddreads
-
setAddexports
-
getAddexports
-
setPatchmodule
-
getPatchmodule
-
setAddopens
-
getAddopens
-
getDestdir
Gets the base directory to output generated class.- Returns:
- destination directory for generated class(es).
-
setDestdir
Sets the base directory to output generated class.- Parameters:
base- destination directory for generated class(es).
-
getDisableXmlSecurity
public boolean getDisableXmlSecurity()Gets the "disableXmlSecurity" flag.- Returns:
- true if extension mode is on, false otherwise.
-
setDisableXmlSecurity
public void setDisableXmlSecurity(boolean disableXmlSecurity) Sets the "disableXmlSecurity" flag.- Parameters:
disableXmlSecurity- true to disable XML security features when parsing XML documents, false otherwise.
-
getExtension
public boolean getExtension()Gets the "extension" flag.- Returns:
- true if extension mode is on, false otherwise.
-
setExtension
public void setExtension(boolean extension) Sets the "extension" flag.- Parameters:
extension- true to set extension mode on, false otherwise.
-
getKeep
public boolean getKeep()Gets the "keep" flag.- Returns:
- Whether to keep generated sources.
-
setKeep
public void setKeep(boolean keep) Sets the "keep" flag.- Parameters:
keep- keep generated sources.
-
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.
-
getSourcedestdir
Gets the directory to place generated source java files.- Returns:
- destination directory for generated source(s).
-
setSourcedestdir
Sets the directory to place generated source java files.- Parameters:
sourceBase- destination directory for generated source(s).
-
setEncoding
Sets the encoding for generated source java files.- Parameters:
encoding- encoding to use in generated sources.
-
getEncoding
Gets the encoding for generated source java files.- Returns:
- encoding to use in generated sources.
-
getVerbose
public boolean getVerbose()Gets the "verbose" flag.- Returns:
- true if messages about what the compiler is doing should be printed out.
-
setVerbose
public void setVerbose(boolean verbose) Sets the "verbose" flag.- Parameters:
verbose- whether to output messages about what the compiler is doing.
-
getDebug
public boolean getDebug()Gets the debug flag.- Returns:
- true if all debugging info should be generated.
-
setDebug
public void setDebug(boolean debug) Sets the debug flag.- Parameters:
debug- generate all debugging info.
-
createJavacarg
public org.apache.tools.ant.types.Commandline.Argument createJavacarg()Adds Javac argument.- Returns:
- Javac argument created.
- Since:
- 2.2.9
-
getJavacargs
public org.apache.tools.ant.types.Commandline getJavacargs() -
isXnocompile
public boolean isXnocompile() -
setXnocompile
public void setXnocompile(boolean xnocompile) -
setFailonerror
public void setFailonerror(boolean value) Mostly for our SQE teams and not to be advertised.- Parameters:
value- a boolean value
-
isFailonerror
public boolean isFailonerror()- Returns:
- true if the task should fail on error.
-
setIncludeantruntime
public void setIncludeantruntime(boolean include) Include ant's own classpath in this task's classpath?- Parameters:
include- a boolean value.
-
getIncludeantruntime
public boolean getIncludeantruntime()Gets whether or not the ant classpath is to be included in the task's classpath.- Returns:
- true if Ant classpath should be included in the task's classpath.
-
setIncludejavaruntime
public void setIncludejavaruntime(boolean include) Sets whether or not to include the java runtime libraries to this task's classpath.- Parameters:
include- a boolean value.
-
getIncludejavaruntime
public boolean getIncludejavaruntime()Gets whether or not the java runtime should be included in this task's classpath.- Returns:
- true if java runtime classpath should be included in the task's classpath.
-
createJvmarg
public org.apache.tools.ant.types.Commandline.Argument createJvmarg()Adds a JVM argument.- Returns:
- JVM argument created
-
execute
protected final void execute(String tool, String toolClass) throws org.apache.tools.ant.BuildException Let the task do it's work.- Parameters:
tool- string to use in logged messagestoolClass- class name to invoke- Throws:
org.apache.tools.ant.BuildException- if invocation fails
-
setupForkCommand
-