Interface CtFunction<T,​R>

Type Parameters:
T - the type of the input to the function
R - the type of the result of the function

public interface CtFunction<T,​R>
Abstraction for functions in the Spoon realm. It is used in the query stack, for example by CtQueryable.map(CtFunction) It is compatible with Java 8 lambdas, hence enable to write one-liner queries with lambdas.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply​(T input)
    Implement this method to transform the input typed by T into an object of type R
  • Method Details

    • apply

      R apply(T input)
      Implement this method to transform the input typed by T into an object of type R