net.sf.daileon.notsupported
Interface Strategy

All Known Implementing Classes:
AnnotationsStrategy

public interface Strategy

The Strategy interface defines methods for evaluating the annotations that correspond to a given domain annotation. The annotation (represented by the Annotation object) is the domain annotation to be evaluated, and this annotation annotates a given element (represented by the ElementRoot object) and is located in a given path. The AbstractAnnotationsReplacer object is responsible for keeping the elements and their corresponding annotations, as well as their domain annotations.

Version:
1.0 01/01/2010
Author:
Beto

Method Summary
 void execute()
          Triggers the process of evaluating a domain annotation.
 void setAnnotation(org.objectweb.asm.attrs.Annotation annotation)
          Sets the domain annotation.
 void setAnnotationsReplacer(AbstractAnnotationsReplacer replacer)
          Sets the AbstractAnnotationsReplacer object.
 void setElement(ElementRoot element)
          Sets the element that contains the domain annotation.
 void setPath(String path)
          Sets the path of the domain annotation.
 

Method Detail

setAnnotationsReplacer

void setAnnotationsReplacer(AbstractAnnotationsReplacer replacer)
Sets the AbstractAnnotationsReplacer object. This object is responsible for keeping the elements and their corresponding annotations, as well as their domain annotations.

Parameters:
replacer - The object that organizes elements and annotations.

setPath

void setPath(String path)
Sets the path of the domain annotation.

Parameters:
path - The path of the domain annotation.

setAnnotation

void setAnnotation(org.objectweb.asm.attrs.Annotation annotation)
Sets the domain annotation.

Parameters:
annotation - The domain annotation.

setElement

void setElement(ElementRoot element)
Sets the element that contains the domain annotation.

Parameters:
element - The element that contains the domain annotation. This element can be a class, a field or a method.

execute

void execute()
Triggers the process of evaluating a domain annotation. Essentially, this method organizes the elements and their corresponding annotations, as well as their domain annotations.

Throws:
IllegalStateException - If any of the elements are not set in the implementation before starting the process of evaluating a domain annotation.
RuntimeException - If any other problem occur in the middle of the process of evaluating a domain annotation.