KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > eval > PartialEvaluator


1 package spoon.reflect.eval;
2
3 import spoon.reflect.code.CtCodeElement;
4 import spoon.reflect.declaration.CtElement;
5
6 /**
7  * This interface defines a simple partial evaluator on the Spoon meta-model. It
8  * recursively transforms a meta-model element by partially evaluating it and
9  * simplifies it when possible (i.e. when constant values are involved).
10  */

11 public interface PartialEvaluator {
12
13     /**
14      * Partially evaluates an element and all its sub-elements.
15      *
16      * @param <R>
17      * the partially evaluated element type
18      * @param parent
19      * the parent element of the partially evaluated element
20      * @param element
21      * the element to be partially evaluated
22      * @return the result of the partial evaluation
23      */

24     <R extends CtCodeElement> R evaluate(CtElement parent, R element);
25
26 }
Popular Tags