1 18 package org.apache.tools.ant.taskdefs.optional.dotnet; 19 20 import org.apache.tools.ant.BuildException; 21 22 23 44 public class JSharp extends DotnetCompile { 45 49 String baseAddress; 50 51 54 boolean pureJava = true; 55 56 59 boolean secureScoping = false; 60 61 63 64 public JSharp() { 65 setExecutable("vjc"); 66 } 67 68 69 73 public void setBaseAddress(String baseAddress) { 74 this.baseAddress = baseAddress; 75 } 76 77 81 public void setPureJava(boolean pureJava) { 82 this.pureJava = pureJava; 83 } 84 85 91 public void setSecureScoping(boolean secureScoping) { 92 this.secureScoping = secureScoping; 93 } 94 95 100 public String getReferenceDelimiter() { 101 return ";"; 102 } 103 104 108 public String getFileExtension() { 109 return ".java"; 110 } 111 112 116 protected void addCompilerSpecificOptions(NetCommand command) { 117 if (pureJava) { 118 command.addArgument("/x:all"); 119 } 120 if (secureScoping) { 121 command.addArgument("/securescoping"); 122 } 123 } 124 125 126 protected void createResourceParameter(NetCommand command, DotnetResource resource) { 127 resource.getParameters(getProject(), command, true); 128 } 129 130 134 protected void validate() 135 throws BuildException { 136 super.validate(); 137 if (getDestFile() == null) { 138 throw new BuildException("DestFile was not specified"); 139 } 140 } 141 } 142 | Popular Tags |