Annotation Type FragmentValue


@Retention(SOURCE) public @interface FragmentValue
Use this annotation in generated code to handle a file fragment inlined in a String literal:
   // Sample code using inlined SQL
   var query = "[.sql/] SELECT name, age FROM contact WHERE age > :age";
 
 // Generated from Manifold
 @FragmentValue(methodName = "runMe", type = Fragment_123456.Query.class)
 public class Fragment_123456 {
   public static class Builder {...}
   public static Builder builder(int age) {...}

   public static class Result {...}

   ...

   public Builder builder(int age) {
     return new Builder( age );
   }

   public static Query runMe() {
     return new Fragment_123456();
   }
 }
 
  • Element Details