net.sf.daileon.notsupported
Class AbstractAnnotationsCollector

java.lang.Object
  extended by org.objectweb.asm.ClassAdapter
      extended by net.sf.daileon.notsupported.AbstractAnnotationsCollector
All Implemented Interfaces:
org.objectweb.asm.ClassVisitor
Direct Known Subclasses:
AnnotationsCollector

abstract class AbstractAnnotationsCollector
extends org.objectweb.asm.ClassAdapter

Essentially, the AbstractAnnotationsCollector is responsible for evaluating the annotations that correspond to a domain annotation and organizing this information in the AbstractAnnotationsReplacer object, referenced by it. This is mainly performed by the Strategy object, indicated in the XML configuration file, and used in the collect(ElementRoot) method.

Version:
1.0 01/01/2010
Author:
Roberto Perillo

Field Summary
private  String path
          The physical path to the class that corresponds to the domain annotation
private  AbstractAnnotationsReplacer replacer
          The object that performs the actual transformations in the final bytecode
 
Fields inherited from class org.objectweb.asm.ClassAdapter
cv
 
Constructor Summary
AbstractAnnotationsCollector(org.objectweb.asm.ClassVisitor classVisitor)
          Class constructor.
 
Method Summary
(package private)  void collect(ElementRoot element)
          Collects the annotations that correspond to a domain annotation, and for such, uses the Strategy object indicated in the XML configuration file.
(package private)  void setPath(String path)
          Sets the physical path of the class that correspond to the domain annotation.
(package private)  void setReplacer(AbstractAnnotationsReplacer replacer)
          Sets the AbstractAnnotationsReplacer object.
 
Methods inherited from class org.objectweb.asm.ClassAdapter
visit, visitAttribute, visitEnd, visitField, visitInnerClass, visitMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

replacer

private AbstractAnnotationsReplacer replacer
The object that performs the actual transformations in the final bytecode


path

private String path
The physical path to the class that corresponds to the domain annotation

Constructor Detail

AbstractAnnotationsCollector

AbstractAnnotationsCollector(org.objectweb.asm.ClassVisitor classVisitor)
Class constructor.

Parameters:
classVisitor - The ClassVisitor object, provided by the ClassTransformer.transform(String, String) method.
Method Detail

setReplacer

void setReplacer(AbstractAnnotationsReplacer replacer)
Sets the AbstractAnnotationsReplacer object. This object is provided by the ClassTransformer.transform(String, String) method and performs the actual transformations at bytecode level.

Parameters:
replacer - The object that performs the actual transformations at bytecode level.

setPath

void setPath(String path)
Sets the physical path of the class that correspond to the domain annotation.

Parameters:
path - The physical path of the domain annotation.

collect

void collect(ElementRoot element)
Collects the annotations that correspond to a domain annotation, and for such, uses the Strategy object indicated in the XML configuration file.

Parameters:
element - The element that will have its annotations analyzed and collected. If a domain annotation is found, it will be evaluated and its corresponding annotations will organized in the AbstractAnnotationsReplacer object.