Annotation Type TransformResult


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface TransformResult
    Used to indicate that the return type of a method should be transformed by calling a method on it, indicated by the TransformWith annotation.

    This annotation should be placed on the method with the least specific return type, if covariant return types are used.

    The return type of the annotation, or a superclass/superinterface of it, must have a method annotated with TransformWith, with a matching value().

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String value
      Gets the name used to match this annotation to a TransformWith annotation.
    • Element Detail

      • value

        java.lang.String value
        Gets the name used to match this annotation to a TransformWith annotation.

        Changing this is only necessary when multiple TransformWith annotations are present in the annotated method's return type's class.

        Returns:
        The name to use
        Default:
        ""