Sun Message Library for SWIFT API

com.stc.swift.codegen
Class SwiftGenerator

java.lang.Object
  extended by com.stc.otd.codegen.BaseGenerator
      extended by com.stc.swift.codegen.SwiftGenerator
All Implemented Interfaces:
com.stc.otd.codegen.Generator

public class SwiftGenerator
extends com.stc.otd.codegen.BaseGenerator

Version:
$Revision: 1.16 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.stc.otd.codegen.Generator
com.stc.otd.codegen.Generator.Task
 
Field Summary
static java.lang.String THUNK_BPEL_CODEGEN_BYPASS
          System property name to flag the Generator to suspend BPEL code generation.
 
Fields inherited from interface com.stc.otd.codegen.Generator
DONT_PRINT_SOURCE, PRINT_SOURCE, PRINT_SOURCE_KEY, wsdlPrefix
 
Constructor Summary
SwiftGenerator()
          Creates new SwiftGenerator
 
Method Summary
 void compile(java.io.File sourceDir, java.io.File targetDir)
          Compile generated code.
 void compile(java.io.File sourceDir, java.io.File targetDir, java.lang.String classpath)
          Compile generated code.
 void compile2(java.io.File srcDir, java.io.File targetDir)
          for utilities use;
 void generate(com.stc.otd.forest.OtdMetaContainer otd, java.io.File baseDir, java.lang.String jarName)
           
 void generateJavaCode(com.stc.otd.forest.OtdMetaContainer otd, java.io.File workingDir)
          Generate all code from given tasks.
 java.util.List getDependentJarClassNames()
           
 com.stc.log4j.Logger getLogger()
           
 boolean isBuildTimeUse()
           
 void isBuildTimeUse(boolean f)
           
 void jarFromDir(java.io.File srcDir, java.lang.String srcDirIncludes, java.lang.String srcDirExcludes, java.io.File destJar, boolean destUpdate)
          Create/update a jar with files from a directory.
 void jarFromJar(java.io.File srcJar, java.lang.String srcJarIncludes, java.lang.String srcJarExcludes, java.io.File destJar, boolean destUpdate)
          Create/update a jar with files from another jar.
static void main(java.lang.String[] args)
           
 com.stc.model.common.ObjectTypeDefinition newRepositoryOtd(java.lang.String otdName)
          Create Swift ObjectTypeDefinition object
 
Methods inherited from class com.stc.otd.codegen.BaseGenerator
addToArchive, buildOtd, delete, generate, generate, getClassLoader, getJarFileName, jar, newDelete, newWSDLObject, newWSDLObject, normalizeOtd, setClassLoader, validateOtd
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THUNK_BPEL_CODEGEN_BYPASS

public static final java.lang.String THUNK_BPEL_CODEGEN_BYPASS
System property name to flag the Generator to suspend BPEL code generation.

See Also:
Constant Field Values
Constructor Detail

SwiftGenerator

public SwiftGenerator()
Creates new SwiftGenerator

Method Detail

newRepositoryOtd

public com.stc.model.common.ObjectTypeDefinition newRepositoryOtd(java.lang.String otdName)
Create Swift ObjectTypeDefinition object

Specified by:
newRepositoryOtd in interface com.stc.otd.codegen.Generator
Overrides:
newRepositoryOtd in class com.stc.otd.codegen.BaseGenerator
Parameters:
otdName - Name for new ObjectTypeDefinition
Returns:
SwiftObjectTypeDefinitionImpl object
Throws:
java.lang.Exception - if any errors occur
See Also:
BaseGenerator.newRepositoryOtd(java.lang.String)

compile

public void compile(java.io.File sourceDir,
                    java.io.File targetDir)
Compile generated code.

Parameters:
sourceDir - Directory in which the generated code is located
targetDir - Directoy into which the compiled classes are placed
See Also:
Generator.compile(java.io.File, java.io.File)

compile

public void compile(java.io.File sourceDir,
                    java.io.File targetDir,
                    java.lang.String classpath)
Compile generated code.

Specified by:
compile in interface com.stc.otd.codegen.Generator
Overrides:
compile in class com.stc.otd.codegen.BaseGenerator
Parameters:
sourceDir - Directory in which the generated code is located
targetDir - Directoy into which the compiled classes are placed
classpath - Classpath to use during compilation
See Also:
BaseGenerator.compile(java.io.File, java.io.File, java.lang.String)

compile2

public void compile2(java.io.File srcDir,
                     java.io.File targetDir)
for utilities use;

Parameters:
compiler -
otdMeta -
srcDir -
targetDir -
msgType -

generateJavaCode

public void generateJavaCode(com.stc.otd.forest.OtdMetaContainer otd,
                             java.io.File workingDir)
                      throws com.stc.otd.codegen.OtdCodeGenException
Generate all code from given tasks.

Parameters:
otd - OTD meta container to generate code from
workingDir - Directory where generated code and package structure should be placed
Throws:
com.stc.otd.codegen.OtdCodeGenException - if an error occurs during the code generation process
See Also:
Generator.generateJavaCode(com.stc.otd.forest.OtdMetaContainer, java.io.File)

generate

public void generate(com.stc.otd.forest.OtdMetaContainer otd,
                     java.io.File baseDir,
                     java.lang.String jarName)
              throws com.stc.otd.codegen.OtdCodeGenException
Overrides:
generate in class com.stc.otd.codegen.BaseGenerator
Parameters:
otd - OtdMetaContainer
baseDir - base directory to store generated codes
Throws:
com.stc.otd.codegen.OtdCodeGenException
See Also:
BaseGenerator.generate(com.stc.otd.forest.OtdMetaContainer, java.io.File, java.lang.String)

jarFromJar

public void jarFromJar(java.io.File srcJar,
                       java.lang.String srcJarIncludes,
                       java.lang.String srcJarExcludes,
                       java.io.File destJar,
                       boolean destUpdate)
Create/update a jar with files from another jar.

Parameters:
srcJar - The source jar where some files will be extracted from.
srcJarIncludes - Pattern for includes
srcJarExcludes - Pattern for excludes
destJar - The destination jar which will be created/updated.
destUpdate - true - update the destJar; false - overwrite/create the destJar

jarFromDir

public void jarFromDir(java.io.File srcDir,
                       java.lang.String srcDirIncludes,
                       java.lang.String srcDirExcludes,
                       java.io.File destJar,
                       boolean destUpdate)
Create/update a jar with files from a directory.

Parameters:
srcDir - The source dir where some files will be picked from.
srcDirIncludes - Pattern for includes
srcDirExcludes - Pattern for excludes
destJar - The destination jar which will be created/updated.
destUpdate - true - update the destJar; false - overwrite/create the destJar

getDependentJarClassNames

public java.util.List getDependentJarClassNames()
Specified by:
getDependentJarClassNames in interface com.stc.otd.codegen.Generator
Overrides:
getDependentJarClassNames in class com.stc.otd.codegen.BaseGenerator
See Also:
BaseGenerator.getDependentJarClassNames()

isBuildTimeUse

public void isBuildTimeUse(boolean f)
Parameters:
f -

isBuildTimeUse

public boolean isBuildTimeUse()
Returns:

main

public static void main(java.lang.String[] args)

getLogger

public com.stc.log4j.Logger getLogger()

Sun Message Library for SWIFT API

Copyright © 2008 Sun Microsystems, Inc. All rights reserved.