org.codehaus.aspectwerkz.annotation.instrumentation
Interface AttributeExtractor

All Known Implementing Classes:
JavassistAttributeExtractor

public interface AttributeExtractor

Methods that should be implemented in order to extract attributes associate with a class.

An implementation this class needs to be provided for each bytecode manipulation library or other meta-data storage mechanism that is supported.

Author:
Jonas Bonér

Field Summary
static Object[] EMPTY_OBJECT_ARRAY
           
 
Method Summary
 Object[] getClassAttributes()
          Retreives attributes associated with the class.
 Object[] getConstructorAttributes(String[] constructorParamTypes)
          Return all the attributes associated with a constructor that have a particular method signature.
 Object[] getFieldAttributes(String fieldName)
          Retreives custom attributes applied to a specific field of the class.
 Object[] getMethodAttributes(String methodName, String[] methodParamTypes)
          Retreives custom attributes applied to a specific method of the class.
 

Field Detail

EMPTY_OBJECT_ARRAY

public static final Object[] EMPTY_OBJECT_ARRAY
Method Detail

getClassAttributes

public Object[] getClassAttributes()
Retreives attributes associated with the class.

Returns:
An array of attributes that satisfy the instanceof comparison with the filter class. Null if there are no attributes associated with the class.

getMethodAttributes

public Object[] getMethodAttributes(String methodName,
                                    String[] methodParamTypes)
Retreives custom attributes applied to a specific method of the class.

Parameters:
methodName - The name of the method.
methodParamTypes - The signature of the method.
Returns:
An array of custom attributes. Null if there are no attributes.

getConstructorAttributes

public Object[] getConstructorAttributes(String[] constructorParamTypes)
Return all the attributes associated with a constructor that have a particular method signature.

Parameters:
constructorParamTypes - An array of parameter types as given by the reflection api.
Returns:
the constructor attributes.

getFieldAttributes

public Object[] getFieldAttributes(String fieldName)
Retreives custom attributes applied to a specific field of the class.

Parameters:
fieldName - the name of a class field.
Returns:
An array of custom attributes. Null if there are no attributes.


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.