| Modifier and Type | Class and Description |
|---|---|
| public static class | Definer.
Enumerated type for format attribute |
| public static class | Definer.
Enumerated type for onError attribute |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private Class | |
| private String | |
| private Class | |
| private static final String | ANTLIB_XML
the extension of an antlib file for autoloading. |
| private String | |
| private boolean | |
| private File | |
| private int | |
| private String | |
| private int | |
| private String | |
| private static final ThreadLocal | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addDefinition(ClassLoader
the ClassLoader to use al, String the name of the definition name, String the classname of the definition classname)Add a definition using the attributes of Definer |
| public void | |
| private URL | Returns: the URL, or null if it isn't valid and the active error policy is not to raise a faultConvert a file to a file: URL. |
| public String | |
| public File | |
| public String | |
| public String | |
| private void | loadAntlib(ClassLoader
the classloader to use. classLoader, URL the url to load the definitions from. url)Load an antlib from a URL. |
| protected void | loadProperties(ClassLoader
the classloader to use al, URL the url to get the definitions from url)Load type definitions as properties from a URL. |
| public static String | Returns: the name of a resource. It may not existthe xml namespace uri that to convert. uri)This is where the logic to map from a URI to an antlib resource is kept. |
| private Enumeration | |
| public void | |
| protected void | setAdapterClass(Class<?>
the class to use to adapt the definition class adapterClass)Set the adapter class. |
| public void | setAdaptTo(String
the name of the adaptto class adaptTo)Set the classname of the class that the definition must be compatible with, either directly or by use of the adapter class. |
| protected void | setAdaptToClass(Class<?>
the class for adaptor. adaptToClass)Set the class for adaptToClass, to be used by derived classes, used instead of the adaptTo attribute. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setOnError(Definer.
an onErrorOnError valueWhat to do if there is an error in loading the class. |
| public void | setResource(String
the resource to use res)Name of the property resource to load ant name/classname pairs from. |
| protected void | |
| private void |
| adapter | back to summary |
|---|---|
| private String adapter | |
| adapterClass | back to summary |
|---|---|
| private Class<?> adapterClass | |
| adaptTo | back to summary |
|---|---|
| private String adaptTo | |
| adaptToClass | back to summary |
|---|---|
| private Class<?> adaptToClass | |
| ANTLIB_XML | back to summary |
|---|---|
| private static final String ANTLIB_XML the extension of an antlib file for autoloading. /antlib.xml | |
| classname | back to summary |
|---|---|
| private String classname | |
| definerSet | back to summary |
|---|---|
| private boolean definerSet | |
| file | back to summary |
|---|---|
| private File file | |
| format | back to summary |
|---|---|
| private int format | |
| name | back to summary |
|---|---|
| private String name | |
| onError | back to summary |
|---|---|
| private int onError | |
| resource | back to summary |
|---|---|
| private String resource | |
| RESOURCE_STACK | back to summary |
|---|---|
| private static final ThreadLocal<Map<URL, Location>> RESOURCE_STACK | |
| restrict | back to summary |
|---|---|
| private boolean restrict | |
| Definer | back to summary |
|---|---|
| public Definer() | |
| addDefinition | back to summary |
|---|---|
| protected void addDefinition(ClassLoader al, String name, String classname) throws BuildException Add a definition using the attributes of Definer
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. Run the definition.
| |
| fileToURL | back to summary |
|---|---|
| private URL fileToURL() Convert a file to a file: URL.
| |
| getClassname | back to summary |
|---|---|
| public String getClassname() Returns the classname of the object we are defining.
May be
| |
| getFile | back to summary |
|---|---|
public File getFile()
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| getResource | back to summary |
|---|---|
public String getResource()
| |
| loadAntlib | back to summary |
|---|---|
| private void loadAntlib(ClassLoader classLoader, URL url) Load an antlib from a URL.
| |
| loadProperties | back to summary |
|---|---|
| protected void loadProperties(ClassLoader al, URL url) Load type definitions as properties from a URL.
| |
| makeResourceFromURI | back to summary |
|---|---|
| public static String makeResourceFromURI(String uri) This is where the logic to map from a URI to an antlib resource is kept. | |
| resourceToURLs | back to summary |
|---|---|
| private Enumeration | |
| setAdapter | back to summary |
|---|---|
| public void setAdapter(String adapter) Set the class name of the adapter class. An adapter class is used to proxy the definition class. It is used if the definition class is not assignable to the adaptto class, or if the adaptto class is not present.
| |
| setAdapterClass | back to summary |
|---|---|
| protected void setAdapterClass(Class<?> adapterClass) Set the adapter class.
| |
| setAdaptTo | back to summary |
|---|---|
| public void setAdaptTo(String adaptTo) Set the classname of the class that the definition must be compatible with, either directly or by use of the adapter class.
| |
| setAdaptToClass | back to summary |
|---|---|
| protected void setAdaptToClass(Class<?> adaptToClass) Set the class for adaptToClass, to be used by derived classes, used instead of the adaptTo attribute.
| |
| setAntlib | back to summary |
|---|---|
| public void setAntlib(String antlib) Antlib attribute, sets resource and uri. uri is set the antlib value and, resource is set to the antlib.xml resource in the classpath. For example antlib="antlib:org.acme.bland.cola" corresponds to uri="antlib:org.acme.bland.cola" resource="org/acme/bland/cola/antlib.xml". ASF Bugzilla Bug 31999
| |
| setClassname | back to summary |
|---|---|
| public void setClassname(String classname) The full class name of the object being defined. Required, unless file or resource have been specified.
| |
| setFile | back to summary |
|---|---|
| public void setFile(File file) Name of the property file to load ant name/classname pairs from.
| |
| setFormat | back to summary |
|---|---|
| public void setFormat(Definer. Sets the format of the file or resource | |
| setName | back to summary |
|---|---|
| public void setName(String name) Name of the definition
| |
| setOnError | back to summary |
|---|---|
| public void setOnError(Definer. What to do if there is an error in loading the class.
| |
| setResource | back to summary |
|---|---|
| public void setResource(String res) Name of the property resource to load ant name/classname pairs from.
| |
| setRestrict | back to summary |
|---|---|
| protected void setRestrict(boolean restrict) The restrict attribute. If this is true, only use this definition in add(X).
| |
| tooManyDefinitions | back to summary |
|---|---|
| private void tooManyDefinitions() handle too many definitions by raising an exception.
| |
EnumeratedAttribute
| Modifier and Type | Field and Description |
|---|---|
| public static final int | PROPERTIES
Enumerated values |
| public static final int | XML
Enumerated values |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | Returns: an array of the allowed values for this attribute.Implements abstract org. |
| PROPERTIES | back to summary |
|---|---|
| public static final int PROPERTIES Enumerated values | |
| XML | back to summary |
|---|---|
| public static final int XML Enumerated values | |
| Format | back to summary |
|---|---|
| public Format() | |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. get the values | |
EnumeratedAttribute
| Modifier and Type | Field and Description |
|---|---|
| public static final int | FAIL
Enumerated values |
| public static final int | FAIL_ALL
Enumerated values |
| public static final int | IGNORE
Enumerated values |
| public static final String | POLICY_FAIL
text value of onerror option fail |
| public static final String | POLICY_FAILALL
text value of onerror option failall |
| public static final String | POLICY_IGNORE
text value of onerror option ignore |
| public static final String | POLICY_REPORT
text value of onerror option report |
| public static final int | REPORT
Enumerated values |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | Returns: an array of the allowed values for this attribute.Implements abstract org. |
| FAIL | back to summary |
|---|---|
| public static final int FAIL Enumerated values | |
| FAIL_ALL | back to summary |
|---|---|
| public static final int FAIL_ALL Enumerated values | |
| IGNORE | back to summary |
|---|---|
| public static final int IGNORE Enumerated values | |
| POLICY_FAIL | back to summary |
|---|---|
| public static final String POLICY_FAIL text value of onerror option fail | |
| POLICY_FAILALL | back to summary |
|---|---|
| public static final String POLICY_FAILALL text value of onerror option failall | |
| POLICY_IGNORE | back to summary |
|---|---|
| public static final String POLICY_IGNORE text value of onerror option ignore | |
| POLICY_REPORT | back to summary |
|---|---|
| public static final String POLICY_REPORT text value of onerror option report | |
| REPORT | back to summary |
|---|---|
| public static final int REPORT Enumerated values | |
| OnError | back to summary |
|---|---|
| public OnError() Constructor | |
| OnError | back to summary |
|---|---|
| public OnError(String value) Constructor using a string.
| |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. get the values | |