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:
velocity.runtime.log
the path to velocity's log file. Default is velocity.log
.
use.classpath.templates"
tells velocity to find its template files on the classpath. Default is true
.
member.template.path
tells velocity the path to the path and filename to use to find the template for Members. Default is MemberTemplate.vm
enum.template.path
tells velocity the path to the path and filename to use to find the template for Enums. Default is EnumTemplate.vm
- Author:
- David Walend david@walend.net
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
EnumSourceBuilder
private EnumSourceBuilder()
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