org.apache.commons.attributes

Class DefaultCachedRepository

Implemented Interfaces:
CachedRepository

(package private) class DefaultCachedRepository
extends java.lang.Object
implements CachedRepository

Since:
2.1

Nested Class Summary

private static class
DefaultCachedRepository.MethodAttributeBundle

Field Summary

private static Collection
EMPTY_COLLECTION
private Collection
classAttributes
private Map
constructors
private Map
fields
private Map
methods

Fields inherited from interface org.apache.commons.attributes.CachedRepository

EMPTY

Constructor Summary

DefaultCachedRepository(Class clazz, AttributeRepositoryClass repo)

Method Summary

Collection
getAttributes()
Collection
getAttributes(Constructor c)
Collection
getAttributes(Field f)
Collection
getAttributes(Method m)
private static Collection
getInheritableAttributes(Collection attrs)
private static Collection
getInheritableClassAttributes(Class c)
private static Collection
getInheritableMethodAttributes(Class c, String methodName, Class[] methodParams)
private static Collection
getInheritableMethodParameterAttributes(Class c, String methodName, Class[] methodParams, int parameter)
private static Collection
getInheritableReturnAttributes(Class c, String methodName, Class[] methodParams)
Collection
getParameterAttributes(Constructor c, int parameter)
Collection
getParameterAttributes(Method m, int parameter)
Collection
getReturnAttributes(Method m)

Field Details

EMPTY_COLLECTION

private static final Collection EMPTY_COLLECTION

classAttributes

private final Collection classAttributes

constructors

private final Map constructors

fields

private final Map fields

methods

private final Map methods

Constructor Details

DefaultCachedRepository

public DefaultCachedRepository(Class clazz,
                               AttributeRepositoryClass repo)

Method Details

getAttributes

public Collection getAttributes()
Specified by:
getAttributes in interface CachedRepository

getAttributes

public Collection getAttributes(Constructor c)
Specified by:
getAttributes in interface CachedRepository

getAttributes

public Collection getAttributes(Field f)
Specified by:
getAttributes in interface CachedRepository

getAttributes

public Collection getAttributes(Method m)
Specified by:
getAttributes in interface CachedRepository

getInheritableAttributes

private static Collection getInheritableAttributes(Collection attrs)

getInheritableClassAttributes

private static Collection getInheritableClassAttributes(Class c)

getInheritableMethodAttributes

private static Collection getInheritableMethodAttributes(Class c,
                                                         String methodName,
                                                         Class[] methodParams)

getInheritableMethodParameterAttributes

private static Collection getInheritableMethodParameterAttributes(Class c,
                                                                  String methodName,
                                                                  Class[] methodParams,
                                                                  int parameter)

getInheritableReturnAttributes

private static Collection getInheritableReturnAttributes(Class c,
                                                         String methodName,
                                                         Class[] methodParams)

getParameterAttributes

public Collection getParameterAttributes(Constructor c,
                                         int parameter)
Specified by:
getParameterAttributes in interface CachedRepository

getParameterAttributes

public Collection getParameterAttributes(Method m,
                                         int parameter)
Specified by:
getParameterAttributes in interface CachedRepository

getReturnAttributes

public Collection getReturnAttributes(Method m)
Specified by:
getReturnAttributes in interface CachedRepository