1 18 19 package org.apache.tools.ant.taskdefs; 20 21 import org.apache.tools.ant.BuildException; 22 import org.apache.tools.ant.ProjectHelper; 23 import org.apache.tools.ant.Task; 24 25 31 public class AntlibDefinition extends Task { 32 33 private String uri = ""; 34 private ClassLoader antlibClassLoader; 35 36 46 public void setURI(String uri) throws BuildException { 47 if (uri.equals(ProjectHelper.ANT_CORE_URI)) { 48 uri = ""; 49 } 50 if (uri.startsWith("ant:")) { 51 throw new BuildException("Attempt to use a reserved URI " + uri); 52 } 53 this.uri = uri; 54 } 55 56 60 public String getURI() { 61 return uri; 62 } 63 64 69 public void setAntlibClassLoader(ClassLoader classLoader) { 70 this.antlibClassLoader = classLoader; 71 } 72 73 78 public ClassLoader getAntlibClassLoader() { 79 return antlibClassLoader; 80 } 81 } 82 | Popular Tags |