org.apache.tools.ant.taskdefs.optional.dotnet
public class Ilasm extends DotnetBaseMatchingTask
All parameters are optional: <il/> should suffice to produce a debug build of all *.il files. The option set is roughly compatible with the CSharp class; even though the command line options are only vaguely equivalent. [The low level commands take things like /OUT=file, csc wants /out:file ... /verbose is used some places; /quiet here in ildasm... etc.] It would be nice if someone made all the command line tools consistent (and not as brittle as the java cmdline tools)
The task is a directory based task, so attributes like includes="*.il" and excludes="broken.il" can be used to control the files pulled in. You can also use nested <src> filesets to refer to source.
UNKNOWN: name="ilasm" category="dotnet"
Nested Class Summary | |
---|---|
static class | Ilasm.TargetTypes
Target types to build.
valid build types are exe|library|module|winexe |
Field Summary | |
---|---|
protected boolean | debug
debug flag. |
protected static String | exe_name
Name of the executable. |
protected static String | exe_title
title of task for external presentation |
protected String | extraOptions
any extra command options? |
protected boolean | failOnError
flag to control action on execution trouble |
protected static String | file_ext
what is the file extension we search on? |
protected static String | file_pattern
and now derive the search pattern from the extension |
protected boolean | listing
listing flag |
protected Vector | referenceFilesets
filesets of references |
protected File | resourceFile
resource file (.res format) to include in the app. |
protected String | targetType
type of target. |
protected boolean | verbose
verbose flag |
Constructor Summary | |
---|---|
Ilasm()
constructor inits everything and set up the search pattern |
Method Summary | |
---|---|
void | addReference(FileSet reference)
add a new reference fileset to the compilation |
void | Clear()
reset all contents. |
void | execute()
This is the execution entry point. |
boolean | getDebug()
query the debug flag
|
protected String | getDebugParameter()
get the argument or null for no argument needed
|
String | getExtraOptions()
Gets the ExtraOptions attribute
|
protected String | getExtraOptionsParameter()
get any extra options or null for no argument needed
|
boolean | getFailOnError()
query fail on error flag
|
protected String | getKeyfileParameter()
get the argument or null for no argument needed
|
protected String | getListingParameter()
turn the listing flag into a parameter for ILASM
|
protected String | getOutputFileParameter()
get the output file
|
protected String | getResourceFileParameter()
Gets the resourceFileParameter attribute of the Ilasm task
|
String | getTargetType()
accessor method for target type
|
protected String | getTargetTypeParameter()
g get the target type or null for no argument needed
|
protected String | getVerboseParameter()
turn the verbose flag into a parameter for ILASM
|
protected static boolean | isFileManagedBinary(File file)
test for a file being managed or not |
protected boolean | notEmpty(String s)
test for a string containing something useful
|
void | setDebug(boolean f)
set the debug flag on or off.
|
void | setExtraOptions(String extraOptions)
Any extra options which are not explicitly
supported by this task.
|
void | setFailOnError(boolean b)
If true, fails if ilasm tool fails.
|
void | setKeyfile(File keyfile)
the name of a file containing a private key.
|
void | setListing(boolean b)
If true, produce a listing (off by default).
|
void | setOutputFile(File params)
Set the output file; identical to setDestFile |
void | setOwner(String s)
Sets the Owner attribute.
|
void | setResourceFile(File fileName)
name of resource file to include.
|
void | setTargetType(String targetType)
Sets the type of target, either "exe" or "library".
|
void | setTargetType(Ilasm.TargetTypes targetType)
set the target type to one of exe|library |
void | setVerbose(boolean b)
If true, enable verbose ILASM output.
|
Parameters: reference
Throws: BuildException if the assembly failed and FailOnError is true
Returns: true if debug is turned on
Returns: The debugParameter value
Returns: The ExtraOptions value
Returns: The ExtraOptions Parameter to CSC
Returns: The failFailOnError value
Returns: The keyfileParameter value
Returns: the appropriate string from the state of the listing flag
Returns: the argument string or null for no argument
Returns: The resourceFileParameter value
Returns: the current target option
Returns: The TargetTypeParameter value
Returns: null or the appropriate command line string
Returns: true if we think this is a managed executable, and thus OK for linking
UNKNOWN: look at the PE header of the exe and see if it is managed or not.
Parameters: s any string
Returns: true if the argument is not null or empty
Parameters: f on/off flag
Parameters: extraOptions The new ExtraOptions value
Parameters: b The new failOnError value
Parameters: keyfile The new keyfile value
Parameters: b flag set to true for listing on
Parameters: params The new outputFile value
See Also: DotnetBaseMatchingTask
Parameters: s The new Owner value
UNKNOWN: ignore="true"
Parameters: fileName path to the file. Can be relative, absolute, whatever.
Parameters: targetType one of exe|library|
Throws: BuildException if target is not one of exe|library
Parameters: targetType
Parameters: b flag set to true for verbose on