1 18 package org.apache.tools.ant.types.spi; 19 20 import org.apache.tools.ant.ProjectComponent; 21 import org.apache.tools.ant.BuildException; 22 23 31 public class Provider extends ProjectComponent { 32 private String type; 33 34 37 public String getClassName() { 38 return type; 39 } 40 41 45 public void setClassName(String type) { 46 this.type = type; 47 } 48 49 52 public void check() { 53 if (type == null) { 54 throw new BuildException( 55 "classname attribute must be set for provider element", 56 getLocation()); 57 } 58 if (type.length() == 0) { 59 throw new BuildException( 60 "Invalid empty classname", getLocation()); 61 } 62 } 63 } 64 | Popular Tags |