net.walend.enum.generator
Class EnumSourceBuilder

java.lang.Object
  |
  +--net.walend.enum.generator.EnumSourceBuilder
All Implemented Interfaces:
Singleton

public class EnumSourceBuilder
extends java.lang.Object
implements Singleton

Builds the Enums from an XML spec into .java source files.

This class uses some system properties:

Author:
David Walend david@walend.net

Field Summary
private static java.lang.String DEFAULTAUTHOR
           
private static java.lang.String DEFAULTLICENSE
           
static EnumSourceBuilder IT
           
 
Constructor Summary
private EnumSourceBuilder()
           
 
Method Summary
 void buildEnum(EnumInfo info, java.io.Writer writer)
           
 java.lang.String createMemberSegment(SingletonInfo info)
           
private  void initVelocity()
           
 void loadEnumInfo(org.apache.velocity.VelocityContext context, EnumInfo info)
           
 void loadSingletonInfo(org.apache.velocity.VelocityContext context, SingletonInfo info)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IT

public static final EnumSourceBuilder IT

DEFAULTAUTHOR

private static final java.lang.String DEFAULTAUTHOR
See Also:
Constant Field Values

DEFAULTLICENSE

private static final java.lang.String DEFAULTLICENSE
See Also:
Constant Field Values
Constructor Detail

EnumSourceBuilder

private EnumSourceBuilder()
Method Detail

initVelocity

private void initVelocity()
                   throws java.lang.Exception
java.lang.Exception

loadSingletonInfo

public void loadSingletonInfo(org.apache.velocity.VelocityContext context,
                              SingletonInfo info)

createMemberSegment

public java.lang.String createMemberSegment(SingletonInfo info)
                                     throws java.io.IOException,
                                            org.apache.velocity.exception.ResourceNotFoundException,
                                            org.apache.velocity.exception.ParseErrorException,
                                            org.apache.velocity.exception.MethodInvocationException,
                                            java.lang.Exception
java.io.IOException
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
org.apache.velocity.exception.MethodInvocationException
java.lang.Exception

loadEnumInfo

public void loadEnumInfo(org.apache.velocity.VelocityContext context,
                         EnumInfo info)

buildEnum

public void buildEnum(EnumInfo info,
                      java.io.Writer writer)
               throws java.io.IOException,
                      org.apache.velocity.exception.ResourceNotFoundException,
                      org.apache.velocity.exception.ParseErrorException,
                      org.apache.velocity.exception.MethodInvocationException,
                      java.lang.Exception
java.io.IOException
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
org.apache.velocity.exception.MethodInvocationException
java.lang.Exception


Copyright (c) 2001, 2002, David Walend