com.sforce.ws.codegen
Class Generator

java.lang.Object
  extended by com.sforce.ws.codegen.Generator
Direct Known Subclasses:
wsdlc

public abstract class Generator
extends Object

Since:
184
Author:
hhildebrand

Field Summary
static String AGGREGATE_RESULT
          Template names
protected  ArrayList<File> javaFiles
           
protected  String packagePrefix
           
static String SIMPLE_TYPE
           
static String SOBJECT
           
protected  org.stringtemplate.v4.STGroupDir templates
           
static String TYPE
           
protected  TypeMapper typeMapper
           
 
Constructor Summary
Generator(String packagePrefix, org.stringtemplate.v4.STGroupDir templates)
           
Generator(String packagePrefix, org.stringtemplate.v4.STGroupDir templates, char startDelim, char endDelim)
           
 
Method Summary
protected  void addFileToJar(String className, String classFile, JarOutputStream jar)
           
protected  void addRuntimeClasses(JarOutputStream jar)
           
protected  void compileTypes(File dir)
           
protected  void generate(Definitions definitions, SfdcApiType sfdcApiType, Types types, File dir)
           
protected  File generate(String packageName, String fileName, Object gen, org.stringtemplate.v4.ST template, File dir)
           
 void generate(URL wsdl, File dest)
           
protected  void generateAggregateResultClasses(Definitions definitions, File dir)
           
protected  void generateAggregateResultClasses(String packageName, File dir)
           
protected  void generateClassFromComplexType(Types types, Schema schema, ComplexType complexType, File dir)
           
protected  void generateClassFromSimpleType(Schema schema, SimpleType simpleType, File dir)
           
protected  void generateComplexTypeClass(Types types, Schema schema, File dir)
           
protected  void generateJarFile(File jarFile, boolean standAlone, File dir)
           
protected  void generateSimpleTypeClass(Schema schema, File dir)
           
protected  void generateSObjectClass(Definitions definitions, File dir)
           
protected  void generateTypeClass(Types types, Schema schema, File dir)
           
protected  void generateTypeClasses(Types types, File dir)
           
protected  InputStream getManifest()
           
protected  String getPackageName(Definitions definitions)
           
protected  ArrayList<String> getRuntimeClasses(ClassLoader cl)
           
protected  boolean requiresAggregateResultClass(Definitions definitions)
           
protected  boolean requiresSObjectClass(Definitions definitions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AGGREGATE_RESULT

public static final String AGGREGATE_RESULT
Template names

See Also:
Constant Field Values

SIMPLE_TYPE

public static final String SIMPLE_TYPE
See Also:
Constant Field Values

SOBJECT

public static final String SOBJECT
See Also:
Constant Field Values

TYPE

public static final String TYPE
See Also:
Constant Field Values

typeMapper

protected final TypeMapper typeMapper

javaFiles

protected final ArrayList<File> javaFiles

packagePrefix

protected final String packagePrefix

templates

protected final org.stringtemplate.v4.STGroupDir templates
Constructor Detail

Generator

public Generator(String packagePrefix,
                 org.stringtemplate.v4.STGroupDir templates)
          throws Exception
Throws:
Exception

Generator

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

generate

public void generate(URL wsdl,
                     File dest)
              throws WsdlParseException,
                     ToolsException,
                     IOException
Throws:
WsdlParseException
ToolsException
IOException

addFileToJar

protected void addFileToJar(String className,
                            String classFile,
                            JarOutputStream jar)
                     throws IOException
Throws:
IOException

addRuntimeClasses

protected void addRuntimeClasses(JarOutputStream jar)
                          throws IOException
Throws:
IOException

compileTypes

protected void compileTypes(File dir)
                     throws ToolsException
Throws:
ToolsException

generate

protected void generate(Definitions definitions,
                        SfdcApiType sfdcApiType,
                        Types types,
                        File dir)
                 throws IOException
Throws:
IOException

generate

protected File generate(String packageName,
                        String fileName,
                        Object gen,
                        org.stringtemplate.v4.ST template,
                        File dir)
                 throws IOException
Throws:
IOException

generateAggregateResultClasses

protected void generateAggregateResultClasses(Definitions definitions,
                                              File dir)
                                       throws IOException
Throws:
IOException

generateAggregateResultClasses

protected void generateAggregateResultClasses(String packageName,
                                              File dir)
                                       throws IOException
Throws:
IOException

generateClassFromComplexType

protected void generateClassFromComplexType(Types types,
                                            Schema schema,
                                            ComplexType complexType,
                                            File dir)
                                     throws IOException
Throws:
IOException

generateClassFromSimpleType

protected void generateClassFromSimpleType(Schema schema,
                                           SimpleType simpleType,
                                           File dir)
                                    throws IOException
Throws:
IOException

generateComplexTypeClass

protected void generateComplexTypeClass(Types types,
                                        Schema schema,
                                        File dir)
                                 throws IOException
Throws:
IOException

generateJarFile

protected void generateJarFile(File jarFile,
                               boolean standAlone,
                               File dir)
                        throws IOException
Throws:
IOException

generateSimpleTypeClass

protected void generateSimpleTypeClass(Schema schema,
                                       File dir)
                                throws IOException
Throws:
IOException

generateSObjectClass

protected void generateSObjectClass(Definitions definitions,
                                    File dir)
                             throws IOException
Throws:
IOException

generateTypeClass

protected void generateTypeClass(Types types,
                                 Schema schema,
                                 File dir)
                          throws IOException
Throws:
IOException

generateTypeClasses

protected void generateTypeClasses(Types types,
                                   File dir)
                            throws IOException
Throws:
IOException

getManifest

protected InputStream getManifest()

getPackageName

protected String getPackageName(Definitions definitions)

getRuntimeClasses

protected ArrayList<String> getRuntimeClasses(ClassLoader cl)
                                       throws IOException
Throws:
IOException

requiresAggregateResultClass

protected boolean requiresAggregateResultClass(Definitions definitions)

requiresSObjectClass

protected boolean requiresSObjectClass(Definitions definitions)


Copyright © 2013. All Rights Reserved.