org.hydrateframework.gen
Class CodeWriterBase

java.lang.Object
  extended by org.hydrateframework.gen.CodeWriterBase
Direct Known Subclasses:
CodeWriterAssemblers, CodeWriterComparators, CodeWriterDefFile, CodeWriterEnumerations, CodeWriterFamily, CodeWriterHelpers, CodeWriterIndexes, CodeWriterInterfaces, CodeWriterSchema, CodeWriterSimple, CodeWriterUtils, CodeWriterXML

public class CodeWriterBase
extends java.lang.Object

Version:
@(#)$Revision: 1.7 $
Author:
David Chamberlin

Field Summary
protected  boolean failed
           
protected  Family family
           
protected  SQLWriter sqlWriter
           
 
Constructor Summary
CodeWriterBase(java.lang.String[] args, java.lang.Class familyClass)
           
 
Method Summary
 boolean failed()
           
 java.io.File[] getFileList()
           
 java.lang.String getTemplate(Member member)
           
 java.lang.String makeDirFromPackage(java.lang.String pkg, boolean utils)
           
 java.io.File makeFile(Family family, ClassDef classDef, boolean useClassName, java.lang.String append)
           
protected  java.lang.String makeProxiedPackageName()
           
 LangWriter openFile(Family family, ClassDef classDef, boolean useClassName, java.lang.String append)
           
 Family readSchema()
           
 void run()
           
 void setProperty(java.lang.String name, java.lang.String value)
          Add a property to this code generator.
 boolean shouldWriteCode(ClassDef classDef)
           
 java.lang.String sqlName(java.lang.String baseName)
           
 void writeCodeForFamily(Family family)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

failed

protected boolean failed

family

protected Family family

sqlWriter

protected SQLWriter sqlWriter
Constructor Detail

CodeWriterBase

public CodeWriterBase(java.lang.String[] args,
                      java.lang.Class familyClass)
Method Detail

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Add a property to this code generator. The list of properties is passed on to the family object that represents the model to be built. This can be used to modify the behaviour of the schema objects so that the code generated is different. This is useful when you want to modify very slightly the way an existing code generator is working by writing code at the schema object level that responds differently depending on the family properties.

Parameters:
name - The name of the property to add
value - The value of the property.

run

public void run()

failed

public boolean failed()

writeCodeForFamily

public void writeCodeForFamily(Family family)

sqlName

public java.lang.String sqlName(java.lang.String baseName)

getFileList

public java.io.File[] getFileList()

makeProxiedPackageName

protected java.lang.String makeProxiedPackageName()

getTemplate

public java.lang.String getTemplate(Member member)

openFile

public LangWriter openFile(Family family,
                           ClassDef classDef,
                           boolean useClassName,
                           java.lang.String append)

makeFile

public java.io.File makeFile(Family family,
                             ClassDef classDef,
                             boolean useClassName,
                             java.lang.String append)

readSchema

public Family readSchema()

shouldWriteCode

public boolean shouldWriteCode(ClassDef classDef)

makeDirFromPackage

public java.lang.String makeDirFromPackage(java.lang.String pkg,
                                           boolean utils)


Copyright © 2000 The Hydrate Project. All Rights Reserved.