Interface PartialEvaluator

All Known Implementing Classes:
VisitorPartialEvaluator

public interface PartialEvaluator
This interface defines a simple partial evaluator on the Spoon Java model. It recursively transforms a meta-model element by partially evaluating it and simplifies it when possible (i.e. when constant values are involved).
  • Method Summary

    Modifier and Type
    Method
    Description
    <R extends CtElement>
    R
    evaluate​(R element)
    Partially evaluates an element and all its sub-elements.
  • Method Details

    • evaluate

      <R extends CtElement> R evaluate(R element)
      Partially evaluates an element and all its sub-elements.
      Type Parameters:
      R - the partially evaluated element type
      Parameters:
      element - the element to be partially evaluated
      Returns:
      the result of the partial evaluation