ozone core API

org.ozoneDB.tools.OPP.srcgen.builder
Class MethodNameUpgradingClassBuilderDecorator

java.lang.Object
  extended byorg.ozoneDB.tools.OPP.srcgen.builder.MethodNameUpgradingClassBuilderDecorator
All Implemented Interfaces:
ClassBuilder

public class MethodNameUpgradingClassBuilderDecorator
extends java.lang.Object
implements ClassBuilder

User: Jocke Date: 2004-jan-04 Time: 14:21:57


Nested Class Summary
 
Nested classes inherited from class org.ozoneDB.tools.OPP.srcgen.ClassBuilder
ClassBuilder.Parameter
 
Field Summary
private  ClassBuilder classBuilder
           
private  MessageWriter msgWriter
           
private  java.util.regex.Pattern updateMethodPattern
           
 
Constructor Summary
MethodNameUpgradingClassBuilderDecorator(ClassBuilder classBuilder, java.lang.String updateMethodExpression)
           
 
Method Summary
 void beginClass(int modifier, java.lang.String fullName, java.lang.String superClass, java.lang.String[] interfaces)
          Called for each new class.
 void endClass()
          Called at the end of each generated class.
 void init(MessageWriter msgWriter)
          Initializes the builder for each new build.
 void makeConstructor(int modifier, ClassBuilder.Parameter[] parameters, java.lang.String[] exceptions)
          Called for each constructor in the current class
 void makeMethod(int modifier, java.lang.String name, ClassBuilder.Parameter[] parameters, java.lang.String returnType, java.lang.String[] exceptions, int lockLevel)
          Called for each method in the current class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classBuilder

private ClassBuilder classBuilder

msgWriter

private MessageWriter msgWriter

updateMethodPattern

private java.util.regex.Pattern updateMethodPattern
Constructor Detail

MethodNameUpgradingClassBuilderDecorator

public MethodNameUpgradingClassBuilderDecorator(ClassBuilder classBuilder,
                                                java.lang.String updateMethodExpression)
Method Detail

init

public void init(MessageWriter msgWriter)
Description copied from interface: ClassBuilder
Initializes the builder for each new build. This method may be called several times during the lifetime of the builder but only once for each build. This method may be used reset any internal state that the builder may have.

Specified by:
init in interface ClassBuilder
Parameters:
msgWriter - The writer the builder should use to report messages.

beginClass

public void beginClass(int modifier,
                       java.lang.String fullName,
                       java.lang.String superClass,
                       java.lang.String[] interfaces)
                throws BuilderException
Description copied from interface: ClassBuilder
Called for each new class. May be called moore than once if the class has inner classes.

Specified by:
beginClass in interface ClassBuilder
Parameters:
modifier - The modifiers for this class
fullName - The full name including package path of this class
superClass - The full name including package pathh for this class
interfaces - The interfaces implemented by this class
Throws:
BuilderException

makeConstructor

public void makeConstructor(int modifier,
                            ClassBuilder.Parameter[] parameters,
                            java.lang.String[] exceptions)
                     throws BuilderException
Description copied from interface: ClassBuilder
Called for each constructor in the current class

Specified by:
makeConstructor in interface ClassBuilder
Parameters:
modifier - The modifier for this constructor
parameters - The parameters for this constructor
exceptions - The exceptions thrown by this constructor
Throws:
BuilderException

makeMethod

public void makeMethod(int modifier,
                       java.lang.String name,
                       ClassBuilder.Parameter[] parameters,
                       java.lang.String returnType,
                       java.lang.String[] exceptions,
                       int lockLevel)
                throws BuilderException
Description copied from interface: ClassBuilder
Called for each method in the current class

Specified by:
makeMethod in interface ClassBuilder
Parameters:
modifier - The modifiers for the method
name - The name of the method
parameters - The parameter list for the method
returnType - The return type of the method, use null for void
exceptions - The exceptions thrown by the method
lockLevel - The lock level for this method
Throws:
BuilderException

endClass

public void endClass()
              throws BuilderException
Description copied from interface: ClassBuilder
Called at the end of each generated class. Must be called once and once only for each beginClass.

Specified by:
endClass in interface ClassBuilder
Throws:
BuilderException

ozone core API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.