|
org.apache.tools.ant.module/3 3.27.0 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tools.ant.module.api.IntrospectedInfo
public final class IntrospectedInfo
Represents Ant-style introspection info for a set of classes. There should be one instance which is loaded automatically from defaults.properties files, i.e. standard tasks/datatypes. A second is loaded from settings and represents custom tasks/datatypes. Uses Ant's IntrospectionHelper for the actual work, but manages the results and makes them safely serializable (stores only classnames, etc.).
All task and type names may be namespace-qualified for use
in Ant 1.6: a name of the form nsuri:localname refers to
an XML element with namespace nsuri and local name localname.
Attribute names could also be similarly qualified, but in practice attributes
used in Ant never have a defined namespace. The prefix antlib:org.apache.tools.ant:
is implied, not expressed, on Ant core element names (for backwards compatibility).
Subelement names are *not* namespace-qualified here, even though in the script
they would be - because the namespace used in the script will actually vary
according to how an antlib is imported and used. An unqualified subelement name
should be understood to inherit a namespace from its parent element.
(Namespace support since org.apache.tools.ant.module/3 3.6)
| Constructor Summary | |
|---|---|
IntrospectedInfo()
Make new empty set of info. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener l)
Add a listener to changes in the definition set. |
Map<String,String> |
getAttributes(String clazz)
Get all attributes supported by this class. |
static IntrospectedInfo |
getDefaults()
Get default definitions specified by Ant's defaults.properties. |
Map<String,String> |
getDefs(String kind)
Get definitions. |
Map<String,String> |
getElements(String clazz)
Get all subelements supported by this class. |
static IntrospectedInfo |
getKnownInfo()
Get all known introspected definitions. |
String[] |
getTags(String clazz)
Get tags represented by this class if it is an EnumeratedAttribute. |
boolean |
isKnown(String clazz)
Is anything known about this class? |
void |
register(String name,
Class clazz,
String kind)
Register a new definition. |
void |
removeChangeListener(ChangeListener l)
Remove a listener to changes in the definition set. |
void |
scanProject(Map<String,Map<String,Class>> defs)
Scan an existing (already-run) project to see if it has any new tasks/types. |
boolean |
supportsText(String clazz)
Does this class support inserting text data? |
String |
toString()
|
void |
unregister(String name,
String kind)
Unregister a definition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntrospectedInfo()
| Method Detail |
|---|
public static IntrospectedInfo getDefaults()
public void addChangeListener(ChangeListener l)
l - the listener to addpublic void removeChangeListener(ChangeListener l)
l - the listener to removepublic Map<String,String> getDefs(String kind)
kind - the kind of definition, e.g. task
public boolean isKnown(String clazz)
clazz - the class name
public boolean supportsText(String clazz) throws IllegalArgumentException
clazz - the class name
IllegalArgumentException - if the class is unknownpublic Map<String,String> getAttributes(String clazz) throws IllegalArgumentException
clazz - the class name
IllegalArgumentException - if the class is unknownpublic Map<String,String> getElements(String clazz) throws IllegalArgumentException
clazz - the class name
IllegalArgumentException - if the class is unknownpublic String[] getTags(String clazz) throws IllegalArgumentException
EnumeratedAttribute.
clazz - the class name
EnumeratedAttribute
IllegalArgumentException - if the class is unknownpublic void register(String name, Class clazz, String kind)
name - name of the task or type as it appears in scriptsclazz - the implementing classkind - the kind of definition to register (task or type currently)public void unregister(String name, String kind)
name - the definition namekind - the kind of definition (task etc.)public void scanProject(Map<String,Map<String,Class>> defs)
defs - map from kinds to maps from names to classespublic String toString()
public static IntrospectedInfo getKnownInfo()
getDefaults() plus custom definitions
encountered in actual build scripts (details unspecified).
|
org.apache.tools.ant.module/3 3.27.0 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||