Java Doc for DotnetCompile.java in  » Build » ANT » org » apache » tools » ant » taskdefs » optional » dotnet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs.optional.dotnet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.taskdefs.optional.dotnet.DotnetBaseMatchingTask
   org.apache.tools.ant.taskdefs.optional.dotnet.DotnetCompile

All known Subclasses:   org.apache.tools.ant.taskdefs.optional.dotnet.VisualBasicCompile,  org.apache.tools.ant.taskdefs.optional.dotnet.JSharp,  org.apache.tools.ant.taskdefs.optional.dotnet.CSharp,
DotnetCompile
abstract public class DotnetCompile extends DotnetBaseMatchingTask (Code)
Abstract superclass for dotnet compiler tasks. History
0.1 First creation Most of the code here was copied verbatim from v0.3 of Steve Loughran's CSharp optional task. Abstracted functionality to allow subclassing of other dotnet compiler types.

version:
   0.1

Inner Class :public static class TargetTypes extends EnumeratedAttribute

Field Summary
final protected static  StringREFERENCE_OPTION
    
protected  StringadditionalModules
    
protected  booleandebug
     debug flag.
protected  VectordefinitionList
    
protected  Stringexecutable
    
protected  StringextraOptions
    
protected  StringmainClass
    
protected  VectorreferenceFilesets
    
protected  Vectorresources
    
protected  StringtargetType
     type of target.
protected  booleanutf8output
    

Constructor Summary
public  DotnetCompile()
    

Method Summary
abstract protected  voidaddCompilerSpecificOptions(NetCommand command)
    
public  voidaddDefine(DotnetDefine define)
    
public  voidaddReference(FileSet reference)
    
protected  intaddReferenceFilesets(NetCommand command, long outputTimestamp)
    
public  voidaddResource(DotnetResource resource)
    
protected  voidaddResources(NetCommand command)
    
public  voidclear()
     reset all contents.
protected  NetCommandcreateNetCommand()
    
abstract protected  voidcreateResourceParameter(NetCommand command, DotnetResource resource)
     Build a C# style parameter.
public  voidexecute()
    
protected  voidfillInSharedParameters(NetCommand command)
    
protected  StringgetAdditionalModulesParameter()
    
public  booleangetDebug()
    
protected  StringgetDebugParameter()
    
public  StringgetDefinitionsDelimiter()
     override point for delimiting definitions.
protected  StringgetDefinitionsParameter()
    
protected  StringgetDestFileParameter()
    
protected  StringgetExecutable()
     This method gets the name of the executable.
public  StringgetExtraOptions()
    
protected  StringgetExtraOptionsParameter()
    
protected  String[]getExtraOptionsParameters()
     get any extra options or null for no argument needed, split them if they represent multiple options.
public  booleangetFailOnError()
    
abstract public  StringgetFileExtension()
     Get the extension of filenames to compile.
public  StringgetFilePattern()
     Get the pattern for files to compile.
public  booleangetIncludeDefaultReferences()
    
protected  StringgetIncludeDefaultReferencesParameter()
    
public  StringgetMainClass()
    
protected  StringgetMainClassParameter()
    
public  booleangetOptimize()
    
protected  StringgetOptimizeParameter()
    
abstract public  StringgetReferenceDelimiter()
     Get the delimiter that the compiler uses between references.
protected  StringgetReferenceFilesParameter()
    
protected  StringgetReferencesParameter()
    
public  StringgetTargetType()
    
protected  StringgetTargetTypeParameter()
    
protected  StringgetUtf8OutputParameter()
    
public  intgetWarnLevel()
    
protected  StringgetWarnLevelParameter()
    
protected  StringgetWin32IconParameter()
    
public  FilegetWin32Res()
     Gets the file of the win32 .res file to include.
protected  StringgetWin32ResParameter()
    
protected static  booleanisFileManagedBinary(File file)
     test for a file being managed or not
Parameters:
  file - the file to test.
public  booleanisUseResponseFile()
    
protected  booleannotEmpty(String s)
    
public  voidsetAdditionalModules(String params)
     Semicolon separated list of modules to refer to.
public  voidsetDebug(boolean f)
     set the debug flag on or off.
public  voidsetDestDir(File dirName)
     Set the destination directory of files to be compiled.
public  voidsetExecutable(String executable)
     set the name of the program, overriding the defaults.
public  voidsetExtraOptions(String extraOptions)
     Any extra options which are not explicitly supported by this task.
public  voidsetFailOnError(boolean b)
     If true, fail on compilation errors.
public  voidsetIncludeDefaultReferences(boolean f)
     If true, automatically includes the common assemblies in dotnet, and tells the compiler to link in mscore.dll.
public  voidsetMainClass(String mainClass)
     Sets the name of main class for executables.
public  voidsetOptimize(boolean f)
     If true, enables optimization flag.
public  voidsetReferenceFiles(Path path)
     Path of references to include.
public  voidsetReferences(String s)
     Semicolon separated list of DLLs to refer to.
public  voidsetTargetType(TargetTypes targetType)
    
public  voidsetTargetType(String ttype)
     Set the type of target.
public  voidsetUseResponseFile(boolean useResponseFile)
     Flag to turn on response file use; default=false. When set the command params are saved to a file and this is passed in with @file.
public  voidsetUtf8Output(boolean enabled)
     If true, require all compiler output to be in UTF8 format.
public  voidsetWarnLevel(int warnLevel)
     Level of warning currently between 1 and 4 with 4 being the strictest.
public  voidsetWin32Icon(File fileName)
     Set the filename of icon to include.
Parameters:
  fileName - path to the file.
public  voidsetWin32Res(File fileName)
     Sets the filename of a win32 resource (.RES) file to include. This is not a .NET resource, but what Windows is used to.
Parameters:
  fileName - path to the file.
protected  voidvalidate()
    

Field Detail
REFERENCE_OPTION
final protected static String REFERENCE_OPTION(Code)



additionalModules
protected String additionalModules(Code)
list of extra modules to refer to



debug
protected boolean debug(Code)
debug flag. Controls generation of debug information.



definitionList
protected Vector definitionList(Code)
a list of definitions to support;



executable
protected String executable(Code)
executable



extraOptions
protected String extraOptions(Code)
any extra command options?



mainClass
protected String mainClass(Code)
main class (or null for automatic choice)



referenceFilesets
protected Vector referenceFilesets(Code)
filesets of references



resources
protected Vector resources(Code)
our resources



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



utf8output
protected boolean utf8output(Code)
utf out flag




Constructor Detail
DotnetCompile
public DotnetCompile()(Code)
constructor inits everything and set up the search pattern




Method Detail
addCompilerSpecificOptions
abstract protected void addCompilerSpecificOptions(NetCommand command)(Code)
add any compiler specifics
Parameters:
  command - the command to use.



addDefine
public void addDefine(DotnetDefine define)(Code)
add a define to the list of definitions
Parameters:
  define - the define value.



addReference
public void addReference(FileSet reference)(Code)
add a new reference fileset to the compilation
Parameters:
  reference - the files to use.



addReferenceFilesets
protected int addReferenceFilesets(NetCommand command, long outputTimestamp)(Code)
run through the list of reference files and add them to the command
Parameters:
  command - the command to use.
Parameters:
  outputTimestamp - timestamp to compare against number of files out of date



addResource
public void addResource(DotnetResource resource)(Code)
link or embed a resource
Parameters:
  resource - the resource to use.



addResources
protected void addResources(NetCommand command)(Code)
for every resource declared, we get the (language specific) resource setting
Parameters:
  command - the net command.



clear
public void clear()(Code)
reset all contents.



createNetCommand
protected NetCommand createNetCommand()(Code)
create our helper command a command prefilled with the exe name and task name



createResourceParameter
abstract protected void createResourceParameter(NetCommand command, DotnetResource resource)(Code)
Build a C# style parameter.
Parameters:
  command - the command.
Parameters:
  resource - the resource.



execute
public void execute() throws BuildException(Code)
do the work by building the command line and then calling it
throws:
  BuildException - if validation or execution failed



fillInSharedParameters
protected void fillInSharedParameters(NetCommand command)(Code)
fill in the common information
Parameters:
  command - the net command.



getAdditionalModulesParameter
protected String getAdditionalModulesParameter()(Code)
get the argument or null for no argument needed The AdditionalModules Parameter to CSC



getDebug
public boolean getDebug()(Code)
query the debug flag true if debug is turned on



getDebugParameter
protected String getDebugParameter()(Code)
get the debug switch argument The Debug Parameter to CSC



getDefinitionsDelimiter
public String getDefinitionsDelimiter()(Code)
override point for delimiting definitions. The definitions limiter, i.e., ";"



getDefinitionsParameter
protected String getDefinitionsParameter() throws BuildException(Code)
get a list of definitions or null a string beginning /D: or null for no definitions
throws:
  BuildException - if there is an error.



getDestFileParameter
protected String getDestFileParameter()(Code)
get the argument or null for no argument needed The OutputFile Parameter to CSC



getExecutable
protected String getExecutable()(Code)
This method gets the name of the executable. the name of the executable



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



getExtraOptionsParameters
protected String[] getExtraOptionsParameters()(Code)
get any extra options or null for no argument needed, split them if they represent multiple options. The ExtraOptions Parameter to CSC



getFailOnError
public boolean getFailOnError()(Code)
query fail on error flag The FailFailOnError value



getFileExtension
abstract public String getFileExtension()(Code)
Get the extension of filenames to compile. The string extension of files to compile.



getFilePattern
public String getFilePattern()(Code)
Get the pattern for files to compile. The compilation file pattern.



getIncludeDefaultReferences
public boolean getIncludeDefaultReferences()(Code)
query automatic reference inclusion flag true if flag is turned on



getIncludeDefaultReferencesParameter
protected String getIncludeDefaultReferencesParameter()(Code)
get the include default references flag or null for no argument needed The Parameter to CSC



getMainClass
public String getMainClass()(Code)
Gets the MainClass attribute The MainClass value



getMainClassParameter
protected String getMainClassParameter()(Code)
get the /main argument or null for no argument needed The MainClass Parameter to CSC



getOptimize
public boolean getOptimize()(Code)
query the optimise flag true if optimise is turned on



getOptimizeParameter
protected String getOptimizeParameter()(Code)
get the optimise flag or null for no argument needed The Optimize Parameter to CSC



getReferenceDelimiter
abstract public String getReferenceDelimiter()(Code)
Get the delimiter that the compiler uses between references. For example, c# will return ";"; VB.NET will return "," The string delimiter for the reference string.



getReferenceFilesParameter
protected String getReferenceFilesParameter()(Code)
turn the path list into a list of files and a /references argument null or a string of references.



getReferencesParameter
protected String getReferencesParameter()(Code)
get the reference string or null for no argument needed The References Parameter to CSC



getTargetType
public String getTargetType()(Code)
Gets the TargetType attribute The TargetType value



getTargetTypeParameter
protected String getTargetTypeParameter()(Code)
get the argument or null for no argument needed The TargetType Parameter to CSC



getUtf8OutputParameter
protected String getUtf8OutputParameter()(Code)
Gets the utf8OutpuParameter attribute of the CSharp object The utf8OutpuParameter value



getWarnLevel
public int getWarnLevel()(Code)
query warn level current value



getWarnLevelParameter
protected String getWarnLevelParameter()(Code)
get the warn level switch The WarnLevel Parameter to CSC



getWin32IconParameter
protected String getWin32IconParameter()(Code)
get the argument or null for no argument needed The Win32Icon Parameter to CSC



getWin32Res
public File getWin32Res()(Code)
Gets the file of the win32 .res file to include. path to the file.



getWin32ResParameter
protected String getWin32ResParameter()(Code)
get the argument or null for no argument needed The Win32Res Parameter to CSC



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



isUseResponseFile
public boolean isUseResponseFile()(Code)
getter for flag The flag indicating whether the compilation is using a response file.



notEmpty
protected boolean notEmpty(String s)(Code)
test for a string containing something useful
Parameters:
  s - string in true if the argument is not null or empty



setAdditionalModules
public void setAdditionalModules(String params)(Code)
Semicolon separated list of modules to refer to.
Parameters:
  params - The new additionalModules value



setDebug
public void setDebug(boolean f)(Code)
set the debug flag on or off.
Parameters:
  f - on/off flag



setDestDir
public void setDestDir(File dirName)(Code)
Set the destination directory of files to be compiled.
Parameters:
  dirName - The new DestDir value



setExecutable
public void setExecutable(String executable)(Code)
set the name of the program, overriding the defaults. Can be used to set the full path to a program, or to switch to an alternate implementation of the command, such as the Mono or Rotor versions -provided they use the same command line arguments as the .NET framework edition
Parameters:
  executable - the name of the program.



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, fail on compilation errors.
Parameters:
  b - The new FailOnError value



setIncludeDefaultReferences
public void setIncludeDefaultReferences(boolean f)(Code)
If true, automatically includes the common assemblies in dotnet, and tells the compiler to link in mscore.dll. set the automatic reference inclusion flag on or off this flag controls the /nostdlib option in CSC
Parameters:
  f - on/off flag



setMainClass
public void setMainClass(String mainClass)(Code)
Sets the name of main class for executables.
Parameters:
  mainClass - The new MainClass value



setOptimize
public void setOptimize(boolean f)(Code)
If true, enables optimization flag.
Parameters:
  f - on/off flag



setReferenceFiles
public void setReferenceFiles(Path path)(Code)
Path of references to include. Wildcards should work.
Parameters:
  path - another path to append



setReferences
public void setReferences(String s)(Code)
Semicolon separated list of DLLs to refer to.
Parameters:
  s - The new References value



setTargetType
public void setTargetType(TargetTypes targetType)(Code)
set the target type to one of exe|library|module|winexe
Parameters:
  targetType - the enumerated value.



setTargetType
public void setTargetType(String ttype) throws BuildException(Code)
Set the type of target.
Parameters:
  ttype - The new TargetType value
exception:
  BuildException - if target is not one ofexe|library|module|winexe



setUseResponseFile
public void setUseResponseFile(boolean useResponseFile)(Code)
Flag to turn on response file use; default=false. When set the command params are saved to a file and this is passed in with @file. The task automatically switches to this mode with big commands; this option is here for testing and emergencies
Parameters:
  useResponseFile - a boolean value.



setUtf8Output
public void setUtf8Output(boolean enabled)(Code)
If true, require all compiler output to be in UTF8 format.
Parameters:
  enabled - The new utf8Output value



setWarnLevel
public void setWarnLevel(int warnLevel)(Code)
Level of warning currently between 1 and 4 with 4 being the strictest.
Parameters:
  warnLevel - warn level -see .net docs for valid range (probably0-4)



setWin32Icon
public void setWin32Icon(File fileName)(Code)
Set the filename of icon to include.
Parameters:
  fileName - path to the file. Can be relative, absolute, whatever.



setWin32Res
public void setWin32Res(File fileName)(Code)
Sets the filename of a win32 resource (.RES) file to include. This is not a .NET resource, but what Windows is used to.
Parameters:
  fileName - path to the file. Can be relative, absolute, whatever.



validate
protected void validate() throws BuildException(Code)
validation code
throws:
  BuildException - if validation failed



Fields inherited from org.apache.tools.ant.taskdefs.optional.dotnet.DotnetBaseMatchingTask
protected Vector filesets(Code)(Java Doc)
final protected static boolean isWindows(Code)(Java Doc)
protected File outputFile(Code)(Java Doc)
protected File srcDir(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.taskdefs.optional.dotnet.DotnetBaseMatchingTask
protected void addFilesAndExecute(NetCommand command, boolean ignoreTimestamps)(Code)(Java Doc)
protected void addFilesToCommand(Hashtable filesToBuild, NetCommand command)(Code)(Java Doc)
public void addSrc(FileSet src)(Code)(Java Doc)
protected int buildFileList(NetCommand command, Hashtable filesToBuild, long outputTimestamp)(Code)(Java Doc)
public File getDestFile()(Code)(Java Doc)
protected long getOutputFileTimestamp()(Code)(Java Doc)
public File getSrcDir()(Code)(Java Doc)
public void setDestFile(File file)(Code)(Java Doc)
public void setSrcDir(File srcDirName)(Code)(Java Doc)

w___w__w_.ja___v___a_2__s_.___c_o_m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.