|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.attributes.AttributeIndex
An index providing a list of elements with given attributes. This
requires that the attribute is Indexed
and that the
attribute indexer tool has been run on the jar file containing the
classes.
Nested Class Summary | |
static class |
AttributeIndex.ConstructorParameter
A constructor parameter. |
private static class |
AttributeIndex.IndexNode
|
static class |
AttributeIndex.MethodParameter
Reference to a method parameter. |
Field Summary | |
private java.lang.ClassLoader |
classLoader
|
private java.util.HashMap |
index
|
Constructor Summary | |
AttributeIndex(java.lang.ClassLoader cl)
Creates a new AttributeIndex for the given ClassLoader. |
Method Summary | |
private void |
addClass(java.lang.String clazzName)
Add a class to the index. |
private void |
addIndex(java.util.Collection attributes,
java.lang.Class clazz)
|
private void |
addIndex(java.util.Collection attributes,
java.lang.reflect.Constructor constructor)
|
private void |
addIndex(java.util.Collection attributes,
java.lang.reflect.Constructor ctor,
int parameter)
|
private void |
addIndex(java.util.Collection attributes,
java.lang.reflect.Field field)
|
private void |
addIndex(java.util.Collection attributes,
java.lang.reflect.Method method)
|
private void |
addIndex(java.util.Collection attributes,
java.lang.reflect.Method method,
int parameter)
|
private void |
addReturnIndex(java.util.Collection attributes,
java.lang.reflect.Method method)
|
java.util.Collection |
getClasses(java.lang.Class attributeClass)
Gets a Collection of the Class es that have an attribute of the specified class. |
java.util.Collection |
getClassesWithAttribute(java.lang.Class attributeClass)
Deprecated. Use the getClasses(Class) method instead. |
java.util.Collection |
getClassesWithAttribute(java.lang.String attributeClass)
Deprecated. Use the getClasses(Class) method instead. |
java.util.Collection |
getConstructorParameters(java.lang.Class attributeClass)
Gets a Collection of the ConstructorParameter s that have an attribute of the specified class. |
java.util.Collection |
getConstructors(java.lang.Class attributeClass)
Gets a Collection of the Constructor s that have an attribute of the specified class. |
java.util.Collection |
getFields(java.lang.Class attributeClass)
Gets a Collection of the Field s that have an attribute of the specified class. |
java.util.Collection |
getMethodParameters(java.lang.Class attributeClass)
Gets a Collection of the MethodParameter s that have an attribute of the specified class. |
java.util.Collection |
getMethods(java.lang.Class attributeClass)
Gets a Collection of the Method s that have an attribute of the specified class. |
java.util.Collection |
getMethodsReturning(java.lang.Class attributeClass)
Gets a Collection of the Method s whose return value has an attribute of the specified class. |
private AttributeIndex.IndexNode |
getNode(java.lang.Class attributeClass)
|
private void |
loadFromURL(java.net.URL url)
Load the attrs.index from a given URL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.util.HashMap index
private final java.lang.ClassLoader classLoader
Constructor Detail |
public AttributeIndex(java.lang.ClassLoader cl) throws java.lang.Exception
Method Detail |
private AttributeIndex.IndexNode getNode(java.lang.Class attributeClass)
private void addIndex(java.util.Collection attributes, java.lang.Class clazz)
private void addIndex(java.util.Collection attributes, java.lang.reflect.Field field)
private void addIndex(java.util.Collection attributes, java.lang.reflect.Method method)
private void addIndex(java.util.Collection attributes, java.lang.reflect.Constructor constructor)
private void addReturnIndex(java.util.Collection attributes, java.lang.reflect.Method method)
private void addIndex(java.util.Collection attributes, java.lang.reflect.Method method, int parameter)
private void addIndex(java.util.Collection attributes, java.lang.reflect.Constructor ctor, int parameter)
private void addClass(java.lang.String clazzName) throws java.lang.Exception
java.lang.Exception
private void loadFromURL(java.net.URL url) throws java.lang.Exception
java.lang.Exception
public java.util.Collection getClassesWithAttribute(java.lang.String attributeClass)
public java.util.Collection getClassesWithAttribute(java.lang.Class attributeClass)
public java.util.Collection getClasses(java.lang.Class attributeClass)
Class
es that have an attribute of the specified class.
The Collection contains the classes (Class).
public java.util.Collection getMethods(java.lang.Class attributeClass)
Method
s that have an attribute of the specified class.
The Collection contains the methods (java.lang.reflect.Method).
public java.util.Collection getMethodsReturning(java.lang.Class attributeClass)
Method
s whose return value has an attribute of the specified class.
The Collection contains the methods (java.lang.reflect.Method).
public java.util.Collection getFields(java.lang.Class attributeClass)
Field
s that have an attribute of the specified class.
The Collection contains the methods (java.lang.reflect.Field).
public java.util.Collection getConstructors(java.lang.Class attributeClass)
Constructor
s that have an attribute of the specified class.
The Collection contains the methods (java.lang.reflect.Constructor).
public java.util.Collection getConstructorParameters(java.lang.Class attributeClass)
ConstructorParameter
s that have an attribute of the specified class.
The Collection contains the methods (AttributeIndex.ConstructorParameter
).
public java.util.Collection getMethodParameters(java.lang.Class attributeClass)
MethodParameter
s that have an attribute of the specified class.
The Collection contains the methods (AttributeIndex.MethodParameter
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |