Class PojoGenerator


  • public class PojoGenerator
    extends Object
    • Method Detail

      • visitSchema

        public PojoGenerator visitSchema​(jakarta.json.JsonObject schema)
      • onRef

        protected String onRef​(PojoGenerator.Ref ref)
        Parameters:
        ref - the reference to resolve.
        Returns:
        the reference class name if resolved else null.
      • beforeEnumEnd

        protected String beforeEnumEnd()
      • beforeClassEnd

        protected String beforeClassEnd()
      • afterClassName

        protected String afterClassName()
      • afterEnumName

        protected String afterEnumName​(Map<String,​String> values,
                                       boolean valuesAreInjected)
        Parameters:
        values - the enum values (key is json name, value is java name).
        valuesAreInjected - is there a toString() with json name or is the enum anemic (only values, no method)
        Returns:
        the data to add after enum name and before the opening brace in enum declaration.
      • enumImports

        protected String enumImports()
      • beforeEnumDeclaration

        protected String beforeEnumDeclaration()
      • beforeClassDeclaration

        protected String beforeClassDeclaration()
      • asType

        protected String asType​(String javaName,
                                jakarta.json.JsonObject schema,
                                boolean required)
      • onEnum

        protected String onEnum​(String javaName,
                                jakarta.json.JsonValue enumList,
                                jakarta.json.JsonObject schema)
      • doEnum

        private void doEnum​(jakarta.json.JsonValue enumList,
                            String className)
      • enumName

        protected String enumName​(String javaName,
                                  jakarta.json.JsonObject schema)
      • onObjectAttribute

        protected String onObjectAttribute​(String javaName,
                                           jakarta.json.JsonObject schema)
      • onItemSchema

        protected String onItemSchema​(String javaName,
                                      jakarta.json.JsonObject schema)
      • toCamelCase

        protected String toCamelCase​(String name)
      • isReserved

        protected boolean isReserved​(String name)
      • getValueAs

        private static <T> T getValueAs​(jakarta.json.JsonObject schema,
                                        String attribute,
                                        Class<T> type)
      • valueAs

        private static <T> T valueAs​(jakarta.json.JsonObject schema,
                                     Class<T> type,
                                     jakarta.json.JsonValue value)