Class Generator

  • Direct Known Subclasses:
    wsdlc

    public abstract class Generator
    extends java.lang.Object
    Since:
    184
    Author:
    hhildebrand
    • Field Detail

      • AGGREGATE_RESULT

        public static final java.lang.String AGGREGATE_RESULT
        Template names
        See Also:
        Constant Field Values
      • EXTENDED_ERROR_DETAILS

        public static final java.lang.String EXTENDED_ERROR_DETAILS
        See Also:
        Constant Field Values
      • IEXTENDED_ERROR_DETAILS

        public static final java.lang.String IEXTENDED_ERROR_DETAILS
        See Also:
        Constant Field Values
      • typeMapper

        protected final TypeMapper typeMapper
      • javaFiles

        protected final java.util.ArrayList<java.io.File> javaFiles
      • packagePrefix

        protected final java.lang.String packagePrefix
      • interfacePackagePrefix

        protected final java.lang.String interfacePackagePrefix
      • templates

        protected final org.stringtemplate.v4.STGroupDir templates
      • generateInterfaces

        protected boolean generateInterfaces
    • Constructor Detail

      • Generator

        public Generator​(java.lang.String packagePrefix,
                         org.stringtemplate.v4.STGroupDir templates,
                         java.lang.String interfacePackagePrefix)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • Generator

        public Generator​(java.lang.String packagePrefix,
                         org.stringtemplate.v4.STGroupDir templates,
                         java.lang.String interfacePackagePrefix,
                         char startDelim,
                         char endDelim)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • addFileToJar

        protected void addFileToJar​(java.lang.String className,
                                    java.lang.String classFile,
                                    java.util.jar.JarOutputStream jar)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • addRuntimeClasses

        protected void addRuntimeClasses​(java.util.jar.JarOutputStream jar)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • generate

        protected void generate​(Definitions definitions,
                                SfdcApiType sfdcApiType,
                                Types types,
                                java.io.File dir)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • generate

        protected java.io.File generate​(java.lang.String packageName,
                                        java.lang.String fileName,
                                        java.lang.Object gen,
                                        org.stringtemplate.v4.ST template,
                                        java.io.File dir)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • newSourceWriter

        protected java.io.Writer newSourceWriter​(java.io.File source)
                                          throws java.io.IOException
        Extension point for embedding applications, like Maven plugins, to provide custom I/O primitives.
        Throws:
        java.io.IOException
      • generateAggregateResultClasses

        protected void generateAggregateResultClasses​(Definitions definitions,
                                                      java.io.File dir)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • generateAggregateResultClasses

        protected void generateAggregateResultClasses​(java.lang.String packageName,
                                                      java.io.File dir)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • generateExtendedErrorDetailsClasses

        protected void generateExtendedErrorDetailsClasses​(Definitions definitions,
                                                           java.io.File dir)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • generateClassFromComplexType

        protected void generateClassFromComplexType​(Types types,
                                                    Schema schema,
                                                    ComplexType complexType,
                                                    java.io.File dir)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • newTypeMetadataConstructor

        protected TypeMetadataConstructor newTypeMetadataConstructor​(Types types,
                                                                     Schema schema,
                                                                     ComplexType complexType,
                                                                     java.io.File dir)
        Extension point for embedding applications, like Maven plugins, to customize TypeMetadataConstructor without changing system properties.
      • generateClassFromSimpleType

        protected void generateClassFromSimpleType​(Schema schema,
                                                   SimpleType simpleType,
                                                   java.io.File dir)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • generateComplexTypeClass

        protected void generateComplexTypeClass​(Types types,
                                                Schema schema,
                                                java.io.File dir)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • generateJarFile

        protected void generateJarFile​(java.io.File jarFile,
                                       boolean standAlone,
                                       java.io.File dir)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • generateSimpleTypeClass

        protected void generateSimpleTypeClass​(Schema schema,
                                               java.io.File dir)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • generateSObjectClass

        protected void generateSObjectClass​(Definitions definitions,
                                            java.io.File dir)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getInterfacePackageName

        protected java.lang.String getInterfacePackageName​(java.lang.String packageName)
      • generateSObjectInterface

        protected void generateSObjectInterface​(Definitions definitions,
                                                java.io.File dir)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • generateTypeClass

        protected void generateTypeClass​(Types types,
                                         Schema schema,
                                         java.io.File dir)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • generateTypeClasses

        protected void generateTypeClasses​(Types types,
                                           java.io.File dir)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getManifest

        protected java.io.InputStream getManifest()
      • getPackageName

        protected java.lang.String getPackageName​(Definitions definitions)
      • getRuntimeClasses

        protected java.util.ArrayList<java.lang.String> getRuntimeClasses​(java.lang.ClassLoader cl)
                                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • requiresAggregateResultClass

        protected boolean requiresAggregateResultClass​(Definitions definitions)
      • requiresSObjectClass

        protected boolean requiresSObjectClass​(Definitions definitions)
      • requiresSObjectInterface

        protected boolean requiresSObjectInterface​(Definitions definitions)