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

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

      • apply

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