org.hydrateframework.gen
Class CodeWriterBase
java.lang.Object
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
Constructor Summary |
CodeWriterBase(java.lang.String[] args,
java.lang.Class familyClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
failed
protected boolean failed
family
protected Family family
sqlWriter
protected SQLWriter sqlWriter
CodeWriterBase
public CodeWriterBase(java.lang.String[] args,
java.lang.Class familyClass)
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 addvalue
- 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.