org.apache.commons.attributes
Class AttributeIndex

java.lang.Object
  extended byorg.apache.commons.attributes.AttributeIndex

public class AttributeIndex
extends Object

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.

Since:
2.1

Nested Class Summary
static class AttributeIndex.ConstructorParameter
          A constructor parameter.
static class AttributeIndex.MethodParameter
          Reference to a method parameter.
 
Constructor Summary
AttributeIndex(ClassLoader cl)
          Creates a new AttributeIndex for the given ClassLoader.
 
Method Summary
 Collection getClasses(Class attributeClass)
          Gets a Collection of the Classes that have an attribute of the specified class.
 Collection getClassesWithAttribute(Class attributeClass)
          Deprecated. Use the getClasses(Class) method instead.
 Collection getClassesWithAttribute(String attributeClass)
          Deprecated. Use the getClasses(Class) method instead.
 Collection getConstructorParameters(Class attributeClass)
          Gets a Collection of the ConstructorParameters that have an attribute of the specified class.
 Collection getConstructors(Class attributeClass)
          Gets a Collection of the Constructors that have an attribute of the specified class.
 Collection getFields(Class attributeClass)
          Gets a Collection of the Fields that have an attribute of the specified class.
 Collection getMethodParameters(Class attributeClass)
          Gets a Collection of the MethodParameters that have an attribute of the specified class.
 Collection getMethods(Class attributeClass)
          Gets a Collection of the Methods that have an attribute of the specified class.
 Collection getMethodsReturning(Class attributeClass)
          Gets a Collection of the Methods whose return value has an attribute of the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeIndex

public AttributeIndex(ClassLoader cl)
               throws Exception
Creates a new AttributeIndex for the given ClassLoader.

Since:
2.1
Method Detail

getClassesWithAttribute

public Collection getClassesWithAttribute(String attributeClass)
Deprecated. Use the getClasses(Class) method instead.

Gets a Collection of the classes that have an attribute of the specified class. The Collection contains the class names (String).

Since:
2.1

getClassesWithAttribute

public Collection getClassesWithAttribute(Class attributeClass)
Deprecated. Use the getClasses(Class) method instead.

Gets a Collection of the classes that have an attribute of the specified class. The Collection contains the class names (String).


getClasses

public Collection getClasses(Class attributeClass)
Gets a Collection of the Classes that have an attribute of the specified class. The Collection contains the classes (Class).

Since:
2.1

getMethods

public Collection getMethods(Class attributeClass)
Gets a Collection of the Methods that have an attribute of the specified class. The Collection contains the methods (java.lang.reflect.Method).

Since:
2.1

getMethodsReturning

public Collection getMethodsReturning(Class attributeClass)
Gets a Collection of the Methods whose return value has an attribute of the specified class. The Collection contains the methods (java.lang.reflect.Method).

Since:
2.1

getFields

public Collection getFields(Class attributeClass)
Gets a Collection of the Fields that have an attribute of the specified class. The Collection contains the methods (java.lang.reflect.Field).

Since:
2.1

getConstructors

public Collection getConstructors(Class attributeClass)
Gets a Collection of the Constructors that have an attribute of the specified class. The Collection contains the methods (java.lang.reflect.Constructor).

Since:
2.1

getConstructorParameters

public Collection getConstructorParameters(Class attributeClass)
Gets a Collection of the ConstructorParameters that have an attribute of the specified class. The Collection contains the methods (AttributeIndex.ConstructorParameter).

Since:
2.1

getMethodParameters

public Collection getMethodParameters(Class attributeClass)
Gets a Collection of the MethodParameters that have an attribute of the specified class. The Collection contains the methods (AttributeIndex.MethodParameter).

Since:
2.1


Copyright © The Apache Software Foundation. All Rights Reserved.