org.codehaus.aspectwerkz.annotation.instrumentation
Interface AttributeEnhancer

All Known Implementing Classes:
AsmAttributeEnhancer

public interface AttributeEnhancer

Enhances a classes with attributes.

Author:
Jonas BonŽr

Field Summary
static String CUSTOM_ATTRIBUTE
          The name of the AspectWerkz custom attributes.
 
Method Summary
 String[] getNearestInterfacesInHierarchy(String innerClassName)
          Return the first interfaces implemented by a level in the class hierarchy (bottom top).
 boolean initialize(String className, URL[] classPath)
          Initializes the attribute enhancer.
 void insertClassAttribute(Object attribute)
          Inserts an attribute on class level.
 void insertConstructorAttribute(com.thoughtworks.qdox.model.JavaMethod method, Object attribute)
          Inserts an attribute on constructor level.
 void insertFieldAttribute(com.thoughtworks.qdox.model.JavaField field, Object attribute)
          Inserts an attribute on field level.
 void insertMethodAttribute(com.thoughtworks.qdox.model.JavaMethod method, Object attribute)
          Inserts an attribute on method level.
 void write(String destDir)
          Writes the enhanced class to file.
 

Field Detail

CUSTOM_ATTRIBUTE

static final String CUSTOM_ATTRIBUTE
The name of the AspectWerkz custom attributes.

See Also:
Constant Field Values
Method Detail

initialize

boolean initialize(String className,
                   URL[] classPath)
Initializes the attribute enhancer.

Must always be called before use.

Parameters:
className - the class name
classPath - the class path
Returns:
true if the class was succefully loaded, false otherwise

insertClassAttribute

void insertClassAttribute(Object attribute)
Inserts an attribute on class level.

Parameters:
attribute - the attribute

insertFieldAttribute

void insertFieldAttribute(com.thoughtworks.qdox.model.JavaField field,
                          Object attribute)
Inserts an attribute on field level.

Parameters:
field - the QDox java field
attribute - the attribute

insertConstructorAttribute

void insertConstructorAttribute(com.thoughtworks.qdox.model.JavaMethod method,
                                Object attribute)
Inserts an attribute on constructor level.

Parameters:
method - the QDox java method
attribute - the attribute

insertMethodAttribute

void insertMethodAttribute(com.thoughtworks.qdox.model.JavaMethod method,
                           Object attribute)
Inserts an attribute on method level.

Parameters:
method - the QDox java method
attribute - the attribute

write

void write(String destDir)
Writes the enhanced class to file.

Parameters:
destDir - the destination directory

getNearestInterfacesInHierarchy

String[] getNearestInterfacesInHierarchy(String innerClassName)
Return the first interfaces implemented by a level in the class hierarchy (bottom top).

Returns:
nearest superclass (including itself) ' implemented interfaces


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