Interface FragmentReference

All Superinterfaces:
Buildable, FieldOrFragment

public interface FragmentReference extends FieldOrFragment
Represents a reference to a named fragment.
  • Method Details

    • fragmentRef

      static FragmentReference fragmentRef(String name)
      Create a fragment reference by specifying the name of the target fragment. In the resulting document, this will appear as `...FRAGMENTNAME`
    • fragmentRef

      static FragmentReference fragmentRef(Fragment fragment)
      Create a fragment reference by providing a built instance of a named fragment. This will actually only use the name of the fragment - in the resulting document, this will appear as `...FRAGMENTNAME`
    • fragmentRefWithDirective

      static FragmentReference fragmentRefWithDirective(String name, Directive... directives)
      Create a fragment reference by specifying the name of the target fragment and directives. In the resulting document, this will appear as `...FRAGMENTNAME @DIRECTIVE`
    • fragmentRefWithDirective

      static FragmentReference fragmentRefWithDirective(Fragment fragment, Directive... directives)
      Create a fragment reference by providing a built instance of a named fragment and directives. This will actually only use the name of the fragment - in the resulting document, this will appear as `...FRAGMENTNAME @DIRECTIVE`
    • getName

      String getName()
    • setName

      void setName(String name)
    • getDirectives

      List<Directive> getDirectives()
    • setDirectives

      void setDirectives(List<Directive> directives)