ch.elca.el4j.util.metadata
Interface Attributes

All Known Implementing Classes:
Annotations, MetaDataCollector, RolesAllowedAnnotationAttributes

public interface Attributes

This Interface has been copied to the EL4J Framework from Spring 2.5. The reason is that it is needed by more than one EL4J core class and no longer integrated inside the Spring 3.0 libraries. Interface for accessing attributes at runtime. This is a facade, which can accommodate any attributes API such as Jakarta Commons Attributes, or (possibly in future) a Spring attributes implementation.

Since:
2.0
Author:
Mark Pollack, Rod Johnson, Jonas Hauenstein (JHN)
File-location:
Attributes
Last check-in date:
2010-01-15 12:21:07 +0100 (Fr, 15. Jan 2010) by jonasha for revision 4091

Method Summary
 Collection getAttributes(Class targetClass)
          Return the class attributes of the target class.
 Collection getAttributes(Class targetClass, Class filter)
          Return the class attributes of the target class of a given type.
 Collection getAttributes(Field targetField)
          Return the field attributes of the target field.
 Collection getAttributes(Field targetField, Class filter)
          Return the field attributes of the target method of a given type.
 Collection getAttributes(Method targetMethod)
          Return the method attributes of the target method.
 Collection getAttributes(Method targetMethod, Class filter)
          Return the method attributes of the target method of a given type.
 

Method Detail

getAttributes

Collection getAttributes(Class targetClass)
Return the class attributes of the target class.

Parameters:
targetClass - the class that contains attribute information
Returns:
a collection of attributes, possibly an empty collection, never null

getAttributes

Collection getAttributes(Class targetClass,
                         Class filter)
Return the class attributes of the target class of a given type.

The class attributes are filtered by providing a Class reference to indicate the type to filter on. This is useful if you know the type of the attribute you are looking for and don't want to sort through the unfiltered Collection yourself.

Parameters:
targetClass - the class that contains attribute information
filter - specify that only this type of class should be returned
Returns:
return only the Collection of attributes that are of the filter type

getAttributes

Collection getAttributes(Method targetMethod)
Return the method attributes of the target method.

Parameters:
targetMethod - the method that contains attribute information
Returns:
a Collection of attributes, possibly an empty Collection, never null

getAttributes

Collection getAttributes(Method targetMethod,
                         Class filter)
Return the method attributes of the target method of a given type.

The method attributes are filtered by providing a Class reference to indicate the type to filter on. This is useful if you know the type of the attribute you are looking for and don't want to sort through the unfiltered Collection yourself.

Parameters:
targetMethod - the method that contains attribute information
filter - specify that only this type of class should be returned
Returns:
a Collection of attributes, possibly an empty Collection, never null

getAttributes

Collection getAttributes(Field targetField)
Return the field attributes of the target field.

Parameters:
targetField - the field that contains attribute information
Returns:
a Collection of attribute, possibly an empty Collection, never null

getAttributes

Collection getAttributes(Field targetField,
                         Class filter)
Return the field attributes of the target method of a given type.

The field attributes are filtered by providing a Class reference to indicate the type to filter on. This is useful if you know the type of the attribute you are looking for and don't want to sort through the unfiltered Collection yourself.

Parameters:
targetField - the field that contains attribute information
filter - specify that only this type of class should be returned
Returns:
a Collection of attributes, possibly an empty Collection, never null


Copyright © 2005-2011 ELCA. All Rights Reserved.