Class BCELClassAnnotator

All Implemented Interfaces:

public class BCELClassAnnotator
extends AbstractBCELClassAnnotator

Class responsible for annotating a class with attributes

Field Summary
Fields inherited from class attrib4j.bcel.AbstractBCELClassAnnotator
_classGen, _constantPool, _constantPoolGen, _javaClass
Constructor Summary
BCELClassAnnotator( classFile, java.lang.String classFileName)
Method Summary
 java.lang.Object createAttributeInstance(java.lang.String attributeText, classLoader, java.lang.String[] attributePackages)
          Internal routine to create an attribute instance.
 byte[] createBytesFromAttribute(java.lang.Object attribute)
Methods inherited from class attrib4j.bcel.AbstractBCELClassAnnotator
createFromPackageSearch, guessParam, insertClassAttribute, insertFieldAttribute, insertMethodAttribute, parseAttributeClassName, parseAttributeParams, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public BCELClassAnnotator( classFile,
                          java.lang.String classFileName)
                   throws AttributeException
Method Detail


public java.lang.Object createAttributeInstance(java.lang.String attributeText,
                                                java.lang.String[] attributePackages)
Internal routine to create an attribute instance. Will search for a classname specified in the attribute text and if not found will search for the classname with word 'Attribute' added to the classname. Will then prepend the packages specified in the attributepackages option.

Specified by:
createAttributeInstance in interface ClassAnnotator
Specified by:
createAttributeInstance in class AbstractBCELClassAnnotator
attributeText - The text associated with the javadoc tag.
classLoader - The class loader user to resolve the attribute class
attributePackages - The list of package names to prefix the attribute search
The appropriatly created and initialized attribute instance.


public byte[] createBytesFromAttribute(java.lang.Object attribute)
Specified by:
createBytesFromAttribute in class AbstractBCELClassAnnotator

Copyright © 2002-2003 Mark Pollack. All Rights Reserved.