Class JavaGRTsCodegen

  • All Implemented Interfaces:

    
    public class JavaGRTsCodegen
    
                        

    Main entry point for Java GRTs (GraphQL Representational Types) code generation. This class handles the generation logic and can be called from CLI or programmatically. Uses ViaductSchema as the schema abstraction layer.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class JavaGRTsCodegen.Result

      Result of the code generation process.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      JavaGRTsCodegen.Result generate(List<File> schemaFiles, File grtOutputDir, String grtPackage, boolean includeRootTypes) Generates Java GRTs from GraphQL schema files with optional root type inclusion.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaGRTsCodegen

        JavaGRTsCodegen()
    • Method Detail

      • generate

         JavaGRTsCodegen.Result generate(List<File> schemaFiles, File grtOutputDir, String grtPackage, boolean includeRootTypes)

        Generates Java GRTs from GraphQL schema files with optional root type inclusion.

        GRT types are written to grtOutputDir in package subdirectories.

        Parameters:
        schemaFiles - list of GraphQL schema files to parse
        grtOutputDir - output directory for generated GRT files (written to package subdirs)
        grtPackage - Java package name for generated GRT types
        includeRootTypes - if true, includes Query, Mutation, Subscription types in generation
        Returns:

        result containing counts of generated types