org.codehaus.aspectwerkz.attribdef.definition.attribute
Interface AttributeEnhancer

All Known Implementing Classes:
BcelAttributeEnhancer

public interface AttributeEnhancer

Enhances a classes with attributes.

Author:
Jonas Bonér

Method Summary
 java.lang.String[] getNearestInterfacesInHierarchy(java.lang.String innerClassName)
          Return the first interfaces implemented by a level in the class hierarchy (bottom top)
 boolean initialize(java.lang.String className, java.lang.String classPath)
          Initializes the attribute enhancer.
 void insertClassAttribute(java.lang.Object attribute)
          Inserts an attribute on class level.
 void insertFieldAttribute(com.thoughtworks.qdox.model.JavaField field, java.lang.Object attribute)
          Inserts an attribute on field level.
 void insertMethodAttribute(com.thoughtworks.qdox.model.JavaMethod method, java.lang.Object attribute)
          Inserts an attribute on method level.
 void write(java.lang.String destDir)
          Writes the enhanced class to file.
 

Method Detail

initialize

public boolean initialize(java.lang.String className,
                          java.lang.String 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

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

Parameters:
attribute - the attribute

insertFieldAttribute

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

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

insertMethodAttribute

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

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

write

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

Parameters:
destDir - the destination directory

getNearestInterfacesInHierarchy

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

Returns:
nearest superclass (including itself) ' implemented interfaces


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.