1 11 package org.eclipse.ant.internal.core; 12 13 14 import java.net.URL ; 15 16 import org.eclipse.ant.core.IAntClasspathEntry; 17 18 public abstract class AntObject { 19 20 protected String fClassName; 21 protected URL fLibrary; 22 protected IAntClasspathEntry fLibraryEntry; 23 protected String fName; 24 private String fPluginLabel; 25 private boolean eclipseRuntime= true; 26 private String fURI= null; 27 28 32 public String getClassName() { 33 return fClassName; 34 } 35 39 public void setClassName(String className) { 40 fClassName = className; 41 } 42 47 public URL getLibrary() { 48 if (fLibrary != null) { 49 return fLibrary; 50 } 51 return fLibraryEntry.getEntryURL(); 52 } 53 58 public void setLibrary(URL library) { 59 fLibrary = library; 60 } 61 62 66 public IAntClasspathEntry getLibraryEntry() { 67 if (fLibraryEntry != null) { 68 return fLibraryEntry; 69 } 70 fLibraryEntry= new AntClasspathEntry(fLibrary); 71 return fLibraryEntry; 72 } 73 77 public void setLibraryEntry(IAntClasspathEntry libraryEntry) { 78 fLibraryEntry = libraryEntry; 79 } 80 81 84 public String toString() { 85 if (fURI == null || fURI.equals("") || fURI.equals("antlib:org.apache.tools.ant")) { return fName; 87 } 88 return fURI + ':' + fName; 89 } 90 95 public boolean isDefault() { 96 return fPluginLabel != null; 97 } 98 99 106 public void setIsDefault(boolean isDefault) { 107 if (!isDefault) { 108 fPluginLabel= null; 109 } 110 } 111 112 119 public void setPluginLabel(String pluginLabel) { 120 fPluginLabel = pluginLabel; 121 } 122 123 130 public String getPluginLabel() { 131 return fPluginLabel; 132 } 133 134 141 public boolean isEclipseRuntimeRequired() { 142 return eclipseRuntime; 143 } 144 145 public void setEclipseRuntimeRequired(boolean eclipseRuntime) { 146 this.eclipseRuntime= eclipseRuntime; 147 } 148 149 156 public String getURI() { 157 return fURI; 158 } 159 160 public void setURI(String uri) { 161 fURI= uri; 162 } 163 } 164 | Popular Tags |