|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.MatchingTask | +--org.apache.tools.ant.taskdefs.optional.dotnet.DotnetBaseMatchingTask | +--org.apache.tools.ant.taskdefs.optional.dotnet.DotnetCompile | +--org.apache.tools.ant.taskdefs.optional.dotnet.VisualBasicCompile
This task compiles Visual Basic.NET source into executables or modules. The task requires vbc.exe on the execute path, unless it or an equivalent program is specified in the executable parameter
All parameters are optional: <vbc/> should suffice to produce a debug build of all *.vb files.
The task is a directory based task, so attributes like includes="**\/*.vb" and excludes="broken.vb" can be used to control the files pulled in. By default, all *.vb files from the project folder down are included in the command. When this happens the destFile -if not specified- is taken as the first file in the list, which may be somewhat hard to control. Specifying the output file with destfile is prudent.
Also, dependency checking only works if destfile is set. As with <csc> nested src filesets of source, reference filesets, definitions and resources can be provided.
Example
<vbc optimize="true" debug="false" warnLevel="4" targetType="exe" definitions="RELEASE" excludes="src/unicode_class.vb" mainClass = "MainApp" destFile="NetApp.exe" optionExplicit="true" optionCompare="text" references="System.Xml,System.Web.Xml" > <reference file="${testCSC.dll}" /> <define name="RELEASE" /> <define name="DEBUG" if="debug.property"/> <define name="def3" unless="def2.property"/> </vbc>
Nested Class Summary |
Nested classes inherited from class org.apache.tools.ant.taskdefs.optional.dotnet.DotnetCompile |
DotnetCompile.TargetTypes |
Field Summary |
Fields inherited from class org.apache.tools.ant.taskdefs.optional.dotnet.DotnetCompile |
additionalModules, debug, definitionList, executable, extraOptions, mainClass, REFERENCE_OPTION, referenceFilesets, resources, targetType, utf8output |
Fields inherited from class org.apache.tools.ant.taskdefs.optional.dotnet.DotnetBaseMatchingTask |
filesets, outputFile, srcDir |
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
VisualBasicCompile()
Constructor for VisualBasicCompile. |
Method Summary | |
protected void |
addCompilerSpecificOptions(NetCommand command)
implement VBC commands |
void |
clear()
reset all contents. |
protected java.lang.String |
createResourceParameter(DotnetResource resource)
from a resource, get the resource param |
java.lang.String |
getFileExtension()
Get the extension of filenames to compile. |
java.lang.String |
getImports()
Get global imports for namespaces in referenced metadata files. |
protected java.lang.String |
getImportsParameter()
Format the option for imports. |
java.lang.String |
getOptionCompare()
"binary" or "text" for the string-comparison style. |
protected java.lang.String |
getOptionCompareParameter()
Format the option for string comparison style. |
boolean |
getOptionExplicit()
Get the flag for whether to require explicit declaration of variables. |
java.lang.String |
getOptionExplicitParameter()
Form the option string for optionExplicit.. |
boolean |
getOptionStrict()
Get the flag for whether to enforce strict language semantics. |
java.lang.String |
getOptionStrictParameter()
For the option string for optionStrict. |
java.lang.String |
getReferenceDelimiter()
Get the delimiter that the compiler uses between references. |
boolean |
getRemoveIntChecks()
Get the flag for removing integer checks. |
java.lang.String |
getRemoveIntChecksParameter()
Form the option string for removeIntChecks. |
java.lang.String |
getRootNamespace()
Get the root namespace. |
protected java.lang.String |
getRootNamespaceParameter()
Form the option string for rootNamespace. |
protected java.lang.String |
getWin32ResParameter()
get the argument or null for no argument needed This is overridden from DotnetCompile.java because VBC uses "/win32resource:" rather than "/win32res:" |
void |
setImports(java.lang.String imports)
Declare global imports for namespaces in referenced metadata files. |
void |
setOptionCompare(java.lang.String optionCompare)
Specify binary- or text-style string comparisons. |
void |
setOptionExplicit(boolean flag)
Whether to require explicit declaration of variables. |
void |
setOptionStrict(boolean flag)
Enforce strict language semantics. |
void |
setRemoveIntChecks(boolean flag)
Whether to remove integer checks. |
void |
setRootNamespace(java.lang.String rootNamespace)
Specifies the root namespace for all type declarations. |
protected void |
validate()
validation code |
Methods inherited from class org.apache.tools.ant.taskdefs.optional.dotnet.DotnetBaseMatchingTask |
addFilesAndExecute, addFilesToCommand, addSrc, buildFileList, getDestFile, getOutputFileTimestamp, getSrcDir, setDestFile, setSrcDir |
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 |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VisualBasicCompile()
Method Detail |
public void clear()
clear
in class DotnetCompile
protected java.lang.String getWin32ResParameter()
getWin32ResParameter
in class DotnetCompile
public void setRemoveIntChecks(boolean flag)
flag
- on/off flagpublic boolean getRemoveIntChecks()
public java.lang.String getRemoveIntChecksParameter()
public void setOptionExplicit(boolean flag)
flag
- on/off flagpublic boolean getOptionExplicit()
public java.lang.String getOptionExplicitParameter()
public void setOptionStrict(boolean flag)
flag
- on/off flagpublic boolean getOptionStrict()
public java.lang.String getOptionStrictParameter()
public void setRootNamespace(java.lang.String rootNamespace)
rootNamespace
- a root namespace.public java.lang.String getRootNamespace()
protected java.lang.String getRootNamespaceParameter()
public void setImports(java.lang.String imports)
imports
- the imports stringpublic java.lang.String getImports()
protected java.lang.String getImportsParameter()
public void setOptionCompare(java.lang.String optionCompare)
optionCompare
- the option compare style. "text" | "binary".public java.lang.String getOptionCompare()
protected java.lang.String getOptionCompareParameter()
protected void addCompilerSpecificOptions(NetCommand command)
addCompilerSpecificOptions
in class DotnetCompile
command
- public java.lang.String getReferenceDelimiter()
getReferenceDelimiter
in class DotnetCompile
public java.lang.String getFileExtension()
getFileExtension
in class DotnetCompile
protected java.lang.String createResourceParameter(DotnetResource resource)
createResourceParameter
in class DotnetCompile
resource
-
protected void validate() throws BuildException
validate
in class DotnetCompile
BuildException
- if validation failed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |