|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attributes
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.
The purpose of using this interface is to decouple Spring code from any specific attributes implementation. Even once JSR-175 is available, there is still value in such a facade interface, as it allows for hierarchical attribute sources: for example, an XML file or properties file might override some attributes defined in source-level metadata with JSR-175 or another framework.
CommonsAttributes
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 |
---|
Collection getAttributes(Class targetClass)
targetClass
- the class that contains attribute information
null
Collection getAttributes(Class targetClass, Class filter)
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.
targetClass
- the class that contains attribute informationfilter
- specify that only this type of class should be returned
Collection getAttributes(Method targetMethod)
targetMethod
- the method that contains attribute information
null
Collection getAttributes(Method targetMethod, Class filter)
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.
targetMethod
- the method that contains attribute informationfilter
- specify that only this type of class should be returned
null
Collection getAttributes(Field targetField)
targetField
- the field that contains attribute information
null
Collection getAttributes(Field targetField, Class filter)
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.
targetField
- the field that contains attribute informationfilter
- specify that only this type of class should be returned
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |