Java Doc for CSharp.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
      org.apache.tools.ant.taskdefs.optional.dotnet.CSharp

CSharp
public class CSharp extends DotnetCompile (Code)
Compiles C# source into executables or modules. csc.exe on Windows or mcs on other platforms 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: <csc/> should suffice to produce a debug build of all *.cs files. However, naming an destFilestops the csc compiler from choosing an output name from random, and allows the dependency checker to determine if the file is out of date.

The task is a directory based task, so attributes like includes="*.cs" and excludes="broken.cs" can be used to control the files pulled in. By default, all *.cs files from the project folder down are included in the command. When this happens the output file -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 seems prudent.

For more complex source trees, nested src elemements can be supplied. When such an element is present, the implicit fileset is ignored. This makes sense, when you think about it :)

For historical reasons the pattern **/*.cs is preset as includes list and you can not override it with an explicit includes attribute. Use nested <src> elements instead of the basedir attribute if you need more control.

References to external files can be made through the references attribute, or (since Ant1.6), via nested <reference> filesets. With the latter, the timestamps of the references are also used in the dependency checking algorithm.

Example

<csc
 optimize="true"
 debug="false"
 docFile="documentation.xml"
 warnLevel="4"
 unsafe="false"
 targetType="exe"
 incremental="false"
 mainClass = "MainApp"
 destFile="NetApp.exe"
 >
 <src dir="src" includes="*.cs" />
 <reference file="${testCSC.dll}" />
 <define name="RELEASE" />
 <define name="DEBUG" if="debug.property"/>
 <define name="def3" unless="def3.property"/>
 </csc>
 

since:
   Ant 1.3


Field Summary
 Stringdefinitions
    
protected  booleanunsafe
     enable unsafe code flag.

Constructor Summary
public  CSharp()
    

Method Summary
public  voidaddCompilerSpecificOptions(NetCommand command)
     add Commands unique to C#.
public  voidclear()
    
protected  voidcreateResourceParameter(NetCommand command, DotnetResource resource)
     Build a C# style parameter.
protected  StringgetDefinitionsParameter()
     override the superclasses version of this method (which we call) with a check for a definitions attribute, the contents of which are appended to the list.
protected  StringgetDocFileParameter()
    
protected  StringgetFileAlignParameter()
    
public  StringgetFileExtension()
     This method indicates the filename extension for C# files.
protected  StringgetFullPathsParameter()
    
public  booleangetIncremental()
    
protected  StringgetIncrementalParameter()
    
protected  StringgetNoConfigParameter()
    
public  StringgetReferenceDelimiter()
     Returns the delimiter which C# uses to separate references, i.e., a semi colon.
public  booleangetUnsafe()
    
protected  StringgetUnsafeParameter()
    
public  voidsetDefinitions(String params)
     Semicolon separated list of defined constants.
public  voidsetDocFile(File f)
    
public  voidsetFileAlign(int fileAlign)
     Set the file alignment.
public  voidsetFullPaths(boolean enabled)
     If true, print the full path of files on errors.
public  voidsetIncremental(boolean incremental)
     set the incremental compilation flag on or off.
public  voidsetNoConfig(boolean enabled)
    
public  voidsetOutputFile(File params)
     The output file.
public  voidsetUnsafe(boolean unsafe)
     If true, enables the unsafe keyword.

Field Detail
definitions
String definitions(Code)
defines list: RELEASE;WIN32;NO_SANITY_CHECKS;;SOMETHING_ELSE'



unsafe
protected boolean unsafe(Code)
enable unsafe code flag. Clearly set to false by default




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




Method Detail
addCompilerSpecificOptions
public void addCompilerSpecificOptions(NetCommand command)(Code)
add Commands unique to C#.
Parameters:
  command - ongoing command



clear
public void clear()(Code)
full cleanup



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



getDefinitionsParameter
protected String getDefinitionsParameter()(Code)
override the superclasses version of this method (which we call) with a check for a definitions attribute, the contents of which are appended to the list. The Definitions Parameter to CSC



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



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



getFileExtension
public String getFileExtension()(Code)
This method indicates the filename extension for C# files. the file extension for C#, i.e., "cs" (without the dot).



getFullPathsParameter
protected String getFullPathsParameter()(Code)
Gets the fullPathsParameter attribute of the CSharp object The fullPathsParameter value or null if unset



getIncremental
public boolean getIncremental()(Code)
query the incrementalflag true if incremental compilation is turned on



getIncrementalParameter
protected String getIncrementalParameter()(Code)
get the incremental build argument The Incremental Parameter to CSC



getNoConfigParameter
protected String getNoConfigParameter()(Code)
Gets the noConfigParameter attribute of the CSharp object The noConfigParameter value



getReferenceDelimiter
public String getReferenceDelimiter()(Code)
Returns the delimiter which C# uses to separate references, i.e., a semi colon. the delimiter.



getUnsafe
public boolean getUnsafe()(Code)
query the Unsafe attribute The Unsafe value



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



setDefinitions
public void setDefinitions(String params)(Code)
Semicolon separated list of defined constants.
Parameters:
  params - The new definitions value



setDocFile
public void setDocFile(File f)(Code)
file for generated XML documentation
Parameters:
  f - output file



setFileAlign
public void setFileAlign(int fileAlign)(Code)
Set the file alignment. Valid values are 0,512, 1024, 2048, 4096, 8192, and 16384, 0 means 'leave to the compiler'
Parameters:
  fileAlign - the value to use.



setFullPaths
public void setFullPaths(boolean enabled)(Code)
If true, print the full path of files on errors.
Parameters:
  enabled - The new fullPaths value



setIncremental
public void setIncremental(boolean incremental)(Code)
set the incremental compilation flag on or off.
Parameters:
  incremental - on/off flag



setNoConfig
public void setNoConfig(boolean enabled)(Code)
A flag that tells the compiler not to read in the compiler settings files 'csc.rsp' in its bin directory and then the local directory
Parameters:
  enabled - The new noConfig value



setOutputFile
public void setOutputFile(File params)(Code)
The output file. This is identical to the destFile attribute.
Parameters:
  params - The new outputFile value



setUnsafe
public void setUnsafe(boolean unsafe)(Code)
If true, enables the unsafe keyword.
Parameters:
  unsafe - The new Unsafe value



Fields inherited from org.apache.tools.ant.taskdefs.optional.dotnet.DotnetCompile
final protected static String REFERENCE_OPTION(Code)(Java Doc)
protected String additionalModules(Code)(Java Doc)
protected boolean debug(Code)(Java Doc)
protected Vector definitionList(Code)(Java Doc)
protected String executable(Code)(Java Doc)
protected String extraOptions(Code)(Java Doc)
protected String mainClass(Code)(Java Doc)
protected Vector referenceFilesets(Code)(Java Doc)
protected Vector resources(Code)(Java Doc)
protected String targetType(Code)(Java Doc)
protected boolean utf8output(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.taskdefs.optional.dotnet.DotnetCompile
abstract protected void addCompilerSpecificOptions(NetCommand command)(Code)(Java Doc)
public void addDefine(DotnetDefine define)(Code)(Java Doc)
public void addReference(FileSet reference)(Code)(Java Doc)
protected int addReferenceFilesets(NetCommand command, long outputTimestamp)(Code)(Java Doc)
public void addResource(DotnetResource resource)(Code)(Java Doc)
protected void addResources(NetCommand command)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
protected NetCommand createNetCommand()(Code)(Java Doc)
abstract protected void createResourceParameter(NetCommand command, DotnetResource resource)(Code)(Java Doc)
public void execute() throws BuildException(Code)(Java Doc)
protected void fillInSharedParameters(NetCommand command)(Code)(Java Doc)
protected String getAdditionalModulesParameter()(Code)(Java Doc)
public boolean getDebug()(Code)(Java Doc)
protected String getDebugParameter()(Code)(Java Doc)
public String getDefinitionsDelimiter()(Code)(Java Doc)
protected String getDefinitionsParameter() throws BuildException(Code)(Java Doc)
protected String getDestFileParameter()(Code)(Java Doc)
protected String getExecutable()(Code)(Java Doc)
public String getExtraOptions()(Code)(Java Doc)
protected String getExtraOptionsParameter()(Code)(Java Doc)
protected String[] getExtraOptionsParameters()(Code)(Java Doc)
public boolean getFailOnError()(Code)(Java Doc)
abstract public String getFileExtension()(Code)(Java Doc)
public String getFilePattern()(Code)(Java Doc)
public boolean getIncludeDefaultReferences()(Code)(Java Doc)
protected String getIncludeDefaultReferencesParameter()(Code)(Java Doc)
public String getMainClass()(Code)(Java Doc)
protected String getMainClassParameter()(Code)(Java Doc)
public boolean getOptimize()(Code)(Java Doc)
protected String getOptimizeParameter()(Code)(Java Doc)
abstract public String getReferenceDelimiter()(Code)(Java Doc)
protected String getReferenceFilesParameter()(Code)(Java Doc)
protected String getReferencesParameter()(Code)(Java Doc)
public String getTargetType()(Code)(Java Doc)
protected String getTargetTypeParameter()(Code)(Java Doc)
protected String getUtf8OutputParameter()(Code)(Java Doc)
public int getWarnLevel()(Code)(Java Doc)
protected String getWarnLevelParameter()(Code)(Java Doc)
protected String getWin32IconParameter()(Code)(Java Doc)
public File getWin32Res()(Code)(Java Doc)
protected String getWin32ResParameter()(Code)(Java Doc)
protected static boolean isFileManagedBinary(File file)(Code)(Java Doc)
public boolean isUseResponseFile()(Code)(Java Doc)
protected boolean notEmpty(String s)(Code)(Java Doc)
public void setAdditionalModules(String params)(Code)(Java Doc)
public void setDebug(boolean f)(Code)(Java Doc)
public void setDestDir(File dirName)(Code)(Java Doc)
public void setExecutable(String executable)(Code)(Java Doc)
public void setExtraOptions(String extraOptions)(Code)(Java Doc)
public void setFailOnError(boolean b)(Code)(Java Doc)
public void setIncludeDefaultReferences(boolean f)(Code)(Java Doc)
public void setMainClass(String mainClass)(Code)(Java Doc)
public void setOptimize(boolean f)(Code)(Java Doc)
public void setReferenceFiles(Path path)(Code)(Java Doc)
public void setReferences(String s)(Code)(Java Doc)
public void setTargetType(TargetTypes targetType)(Code)(Java Doc)
public void setTargetType(String ttype) throws BuildException(Code)(Java Doc)
public void setUseResponseFile(boolean useResponseFile)(Code)(Java Doc)
public void setUtf8Output(boolean enabled)(Code)(Java Doc)
public void setWarnLevel(int warnLevel)(Code)(Java Doc)
public void setWin32Icon(File fileName)(Code)(Java Doc)
public void setWin32Res(File fileName)(Code)(Java Doc)
protected void validate() throws BuildException(Code)(Java Doc)

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__.j__av_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.