Annotation Type FeedSpecAnnotations.TemplateSpec

Enclosing interface:
FeedSpecAnnotations

@ExperimentalApi @Target(METHOD) @Retention(RUNTIME) public static @interface FeedSpecAnnotations.TemplateSpec
A template spec is for producing string values based on a string template with inputs provided by other specs.
Since:
5.0.0
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Specifies a string template that uses ${} syntax for placeholders.
  • Element Details

    • value

      Specifies a string template that uses ${} syntax for placeholders. The placeholder refers to spec properties defined by a feed.

      Example:

      
       @Feed.Source(resource = "sample.csv")
       interface SampleFeed extends Feed {
      
           FeedSpec<String> firstName();
      
           FeedSpec<String> lastName();
      
           @TemplateSpec("Hello ${firstName} ${lastName}!")
           FeedSpec<String> greeting();
       }
       
      Since:
      5.0.0