Interface Transformer<T>

  • Type Parameters:
    T - the type to transform to.
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Transformer<T>
    Transformer for a @ParameterType with zero or one capture groups.
    • Method Detail

      • transform

        T transform​(String arg)
             throws Throwable
        Transforms a string into to an object. The string is either taken from the sole capture group or matches the whole expression. Nested capture groups are ignored.

        If the capture group is optional arg may be null.

        Parameters:
        arg - the value of the single capture group
        Returns:
        the transformed object
        Throws:
        Throwable - if transformation failed