org.apache.tools.ant.taskdefs.optional.dotnet .DotnetBaseMatchingTask org.apache.tools.ant.taskdefs.optional.dotnet .Ilasm Ilasm public class Ilasm extends DotnetBaseMatchingTask (Code) Assembles .NET Intermediate Language files.
ilasm.exe must be on the execute path, unless another executable
or the full path to that executable is specified in the executable
parameter
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.
Constructor Summary public Ilasm ()
debug protected boolean debug(Code) debug flag. Controls generation of debug information.
exe_name final protected static String exe_name (Code) Name of the executable. The .exe suffix is deliberately not included in
anticipation of the unix version
exe_title final protected static String exe_title (Code) title of task for external presentation
extraOptions protected String extraOptions(Code) any extra command options?
failOnError protected boolean failOnError(Code) flag to control action on execution trouble
file_ext final protected static String file_ext (Code) what is the file extension we search on?
file_pattern final protected static String file_pattern (Code) and now derive the search pattern from the extension
listing protected boolean listing(Code) listing flag
referenceFilesets protected Vector referenceFilesets(Code) filesets of references
resourceFile protected File resourceFile(Code) resource file (.res format) to include in the app.
targetType protected String targetType(Code) type of target. Should be one of exe|library|module|winexe|(null)
default is exe; the actual value (if not null) is fed to the command
line.
See /target
verbose protected boolean verbose(Code) verbose flag
Ilasm public Ilasm()(Code) constructor inits everything and set up the search pattern
Clear public void Clear()(Code) reset all contents.
addReference public void addReference(FileSet reference)(Code) add a new reference fileset to the compilation
Parameters: reference - the fileset to use.
execute public void execute() throws BuildException (Code) This is the execution entry point. Build a list of files and call ilasm
on each of them.
throws: BuildException - if the assembly failed and FailOnError is true
getDebug public boolean getDebug()(Code) query the debug flag
true if debug is turned on
getDebugParameter protected String getDebugParameter()(Code) get the argument or null for no argument needed
The debugParameter value
getExtraOptions public String getExtraOptions()(Code) Gets the ExtraOptions attribute
The ExtraOptions value
getExtraOptionsParameter protected String getExtraOptionsParameter()(Code) get any extra options or null for no argument needed
The ExtraOptions Parameter to CSC
getFailOnError public boolean getFailOnError()(Code) query fail on error flag
The failFailOnError value
getKeyfileParameter protected String getKeyfileParameter()(Code) get the argument or null for no argument needed
The keyfileParameter value
getListingParameter protected String getListingParameter()(Code) turn the listing flag into a parameter for ILASM
the appropriate string from the state of the listing flag
getOutputFileParameter protected String getOutputFileParameter()(Code) get the output file
the argument string or null for no argument
getResourceFileParameter protected String getResourceFileParameter()(Code) Gets the resourceFileParameter attribute of the Ilasm task
The resourceFileParameter value
getTargetType public String getTargetType()(Code) accessor method for target type
the current target option
getTargetTypeParameter protected String getTargetTypeParameter()(Code) g get the target type or null for no argument needed
The TargetTypeParameter value
getVerboseParameter protected String getVerboseParameter()(Code) turn the verbose flag into a parameter for ILASM
null or the appropriate command line string
isFileManagedBinary protected static boolean isFileManagedBinary(File file)(Code) test for a file being managed or not
Parameters: file - the file to test. true if we think this is a managed executable, and thus OKfor linking
notEmpty protected boolean notEmpty(String s)(Code) test for a string containing something useful
Parameters: s - any string true if the argument is not null or empty
setDebug public void setDebug(boolean f)(Code) set the debug flag on or off.
Parameters: f - on/off flag
setExtraOptions public void setExtraOptions(String extraOptions)(Code) Any extra options which are not explicitly
supported by this task.
Parameters: extraOptions - The new ExtraOptions value
setFailOnError public void setFailOnError(boolean b)(Code) If true, fails if ilasm tool fails.
Parameters: b - The new failOnError value
setKeyfile public void setKeyfile(File keyfile)(Code) the name of a file containing a private key.
Parameters: keyfile - The new keyfile value
setListing public void setListing(boolean b)(Code) If true, produce a listing (off by default).
Parameters: b - flag set to true for listing on
setMono public void setMono(boolean b)(Code) Explicitly override the Mono auto-detection.
Defaults to false on Windows and true on any other platform.
Parameters: b - a boolean
value.since: Ant 1.7
setOwner public void setOwner(String s)(Code) Sets the Owner attribute.
Parameters: s - The new Owner value
setResourceFile public void setResourceFile(File fileName)(Code) name of resource file to include.
Parameters: fileName - path to the file. Can be relative, absolute, whatever.
setTargetType public void setTargetType(String targetType) throws BuildException (Code) Sets the type of target, either "exe" or "library".
Parameters: targetType - one of exe|library|exception: BuildException - if target is not one ofexe|library
setTargetType public void setTargetType(TargetTypes targetType)(Code) set the target type to one of exe|library
Parameters: targetType - the enumerated value.
setVerbose public void setVerbose(boolean b)(Code) If true, enable verbose ILASM output.
Parameters: b - flag set to true for verbose on