attrib4j.bcel
Class BCELClassAnnotator

java.lang.Object
  |
  +--attrib4j.bcel.AbstractBCELClassAnnotator
        |
        +--attrib4j.bcel.BCELClassAnnotator
All Implemented Interfaces:
ClassAnnotator

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(java.io.InputStream classFile, java.lang.String classFileName)
           
 
Method Summary
 java.lang.Object createAttributeInstance(java.lang.String attributeText, java.net.URLClassLoader 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

BCELClassAnnotator

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

createAttributeInstance

public java.lang.Object createAttributeInstance(java.lang.String attributeText,
                                                java.net.URLClassLoader classLoader,
                                                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
Parameters:
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
Returns:
The appropriatly created and initialized attribute instance.

createBytesFromAttribute

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


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