com.bowstreet.builderutilities
Class BuilderAPIGenerator

java.lang.Object
  extended by com.bowstreet.builderutilities.BuilderAPIGenerator

public class BuilderAPIGenerator
extends java.lang.Object

Create one or more wrapper files providing a programmatically-invokable API for builders.


Field Summary
static java.lang.String BUILDER_CLASS_TEMPLATE_DEFAULT
           
static java.lang.String COORDINATOR_CLASS_TEMPLATE_DEFAULT
           
static java.lang.String PREDEFINED_STATICS
           
 
Constructor Summary
BuilderAPIGenerator()
           
 
Method Summary
static void main(java.lang.String[] args)
          Parse at the arguments and do the generation.
static java.util.Collection parseDelimitedList(java.lang.String delimitedList)
          Parse comma-delimited strings into a List object.
 void processBuilderDefs()
          Given the places to put things and the builder ID filter, generate the sources.
 void processOneBuilderDef(java.lang.String srcBase, java.lang.String classBase, java.lang.String builderID, boolean createBuilderClass)
          Generate the api class, and possibly the builder java files
 void runFromArgs(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILDER_CLASS_TEMPLATE_DEFAULT

public static final java.lang.String BUILDER_CLASS_TEMPLATE_DEFAULT
See Also:
Constant Field Values

COORDINATOR_CLASS_TEMPLATE_DEFAULT

public static final java.lang.String COORDINATOR_CLASS_TEMPLATE_DEFAULT
See Also:
Constant Field Values

PREDEFINED_STATICS

public static final java.lang.String PREDEFINED_STATICS
See Also:
Constant Field Values
Constructor Detail

BuilderAPIGenerator

public BuilderAPIGenerator()
Method Detail

main

public static void main(java.lang.String[] args)
Parse at the arguments and do the generation.


parseDelimitedList

public static java.util.Collection parseDelimitedList(java.lang.String delimitedList)
Parse comma-delimited strings into a List object. Other delimiters include the ":" and ";" characters. To specify one, include it as the first character in the string. Example: ";red;white;blue"

Parameters:
delimitedList - -- comma-delimited string
Returns:
a List object containing string tokens.

processBuilderDefs

public void processBuilderDefs()
                        throws java.lang.Exception
Given the places to put things and the builder ID filter, generate the sources. The first argument is the ID of the builder to generate, or the common prefix of the builders to handle. If omitted, wrappers for all registered builders are created. The source base is the root directory for the creation of the source files. The third argument is the directory into which the sources are compiled.

Throws:
java.lang.Exception

processOneBuilderDef

public void processOneBuilderDef(java.lang.String srcBase,
                                 java.lang.String classBase,
                                 java.lang.String builderID,
                                 boolean createBuilderClass)
                          throws java.io.FileNotFoundException,
                                 java.io.IOException
Generate the api class, and possibly the builder java files

Throws:
java.io.FileNotFoundException
java.io.IOException

runFromArgs

public void runFromArgs(java.lang.String[] args)


Copyright © 2009 IBM. All Rights Reserved.