Class CodeInterfaceSchemaWithFederationMethodGenerator

java.lang.Object
no.sikt.graphitron.generators.abstractions.SimpleMethodGenerator
no.sikt.graphitron.generators.codeinterface.CodeInterfaceSchemaWithFederationMethodGenerator
All Implemented Interfaces:
MethodGenerator

public class CodeInterfaceSchemaWithFederationMethodGenerator extends SimpleMethodGenerator
Generates the getSchema(..., includeFederation) overload method that provides a simple API for getting either a regular or federated schema based on a boolean flag.

This method delegates to getFederatedSchema when federation is enabled, or falls back to the regular getSchema method otherwise.

  • Constructor Details

    • CodeInterfaceSchemaWithFederationMethodGenerator

      public CodeInterfaceSchemaWithFederationMethodGenerator(ProcessedSchema processedSchema)
  • Method Details

    • generate

      public no.sikt.graphitron.javapoet.MethodSpec generate()
      Specified by:
      generate in class SimpleMethodGenerator
      Returns:
      The complete javapoet MethodSpec based on the provided target.