org.codehaus.aspectwerkz.annotation.instrumentation.javassist
Class JavassistAttributeExtractor

java.lang.Object
  extended byorg.codehaus.aspectwerkz.annotation.instrumentation.javassist.JavassistAttributeExtractor
All Implemented Interfaces:
AttributeExtractor

public class JavassistAttributeExtractor
extends Object
implements AttributeExtractor

Javassist implementation of the AttributeExtractor interface. Extracts attributes from the class file on class, method and field level.

Author:
Jonas Bonér , Alexandre Vasseur

Field Summary
 
Fields inherited from interface org.codehaus.aspectwerkz.annotation.instrumentation.AttributeExtractor
EMPTY_OBJECT_ARRAY
 
Constructor Summary
JavassistAttributeExtractor()
           
 
Method Summary
 Object[] getClassAttributes()
          Returns the class attributes.
 Object[] getConstructorAttributes(String[] constructorParamTypes)
          Return all the attributes associated with a constructor that have a particular method signature.
 Object[] getFieldAttributes(String fieldName)
          Return all the attributes associated with a field.
 Object[] getMethodAttributes(Method method)
           
 Object[] getMethodAttributes(String methodName, String[] methodParamTypes)
          Return all the attributes associated with a method that have a particular method signature.
 void initialize(javassist.CtClass ctClass)
          Open the classfile and parse it in to the Javassist library.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavassistAttributeExtractor

public JavassistAttributeExtractor()
Method Detail

initialize

public void initialize(javassist.CtClass ctClass)
Open the classfile and parse it in to the Javassist library.

Parameters:
ctClass - the class

getClassAttributes

public Object[] getClassAttributes()
Returns the class attributes.

Specified by:
getClassAttributes in interface AttributeExtractor
Returns:
the class attributes

getMethodAttributes

public Object[] getMethodAttributes(Method method)

getMethodAttributes

public Object[] getMethodAttributes(String methodName,
                                    String[] methodParamTypes)
Return all the attributes associated with a method that have a particular method signature.

Specified by:
getMethodAttributes in interface AttributeExtractor
Parameters:
methodName - The name of the method.
methodParamTypes - An array of parameter types as given by the reflection api.
Returns:
the method attributes.

getConstructorAttributes

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

Specified by:
getConstructorAttributes in interface AttributeExtractor
Parameters:
constructorParamTypes - An array of parameter types as given by the reflection api.
Returns:
the constructor attributes.

getFieldAttributes

public Object[] getFieldAttributes(String fieldName)
Return all the attributes associated with a field.

Specified by:
getFieldAttributes in interface AttributeExtractor
Parameters:
fieldName - The name of the field.
Returns:
the field attributes.


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