org.apache.cayenne.gen
Class AntClassGenerator

java.lang.Object
  extended by org.apache.cayenne.gen.MapClassGenerator
      extended by org.apache.cayenne.gen.DefaultClassGenerator
          extended by org.apache.cayenne.gen.AntClassGenerator

public class AntClassGenerator
extends DefaultClassGenerator

Ant-specific extension of DefaultClassGenerator that provides logging functions.

Author:
Andrei Adamchik

Field Summary
protected  org.apache.tools.ant.Task parentTask
           
 
Fields inherited from class org.apache.cayenne.gen.DefaultClassGenerator
destDir, encoding, makePairs, outputPattern, overwrite, superTemplate, template, timestamp, usePkgPath
 
Fields inherited from class org.apache.cayenne.gen.MapClassGenerator
client, CLIENT_SUBCLASS_TEMPLATE_1_2, CLIENT_SUPERCLASS_TEMPLATE_1_2, dataMap, DEFAULT_VERSION, mode, MODE_DATAMAP, MODE_ENTITY, objEntities, SINGLE_CLASS_TEMPLATE, SINGLE_CLASS_TEMPLATE_1_1, SINGLE_CLASS_TEMPLATE_1_2, SUBCLASS_TEMPLATE, SUBCLASS_TEMPLATE_1_1, SUBCLASS_TEMPLATE_1_2, SUPERCLASS_PREFIX, SUPERCLASS_TEMPLATE, SUPERCLASS_TEMPLATE_1_1, SUPERCLASS_TEMPLATE_1_2, superPkg, VERSION_1_1, VERSION_1_2, versionString, vppConfig
 
Constructor Summary
AntClassGenerator()
           
 
Method Summary
protected  java.io.File fileForClass(java.lang.String pkgName, java.lang.String className)
          Returns a target file where a generated class must be saved.
protected  java.io.File fileForSuperclass(java.lang.String pkgName, java.lang.String className)
          Returns a target file where a generated superclass must be saved.
 org.apache.tools.ant.Task getParentTask()
           
 void setParentTask(org.apache.tools.ant.Task parentTask)
          Sets the Ant task that uses this generator.
 
Methods inherited from class org.apache.cayenne.gen.DefaultClassGenerator
closeWriter, execute, getEncoding, getSupertemplateForPairs, getTemplateForPairs, getTemplateForSingles, getTimestamp, isOld, mkpath, openWriter, setDestDir, setEncoding, setMakePairs, setOutputPattern, setOverwrite, setSuperTemplate, setSuperTemplate, setTemplate, setTemplate, setTimestamp, setUsePkgPath, validateAttributes
 
Methods inherited from class org.apache.cayenne.gen.MapClassGenerator
defaultSingleClassTemplate, defaultSubclassTemplate, defaultSuperclassTemplate, generateClassPairs, generateClassPairs, generateSingleClasses, generateSingleClasses, generateSingleClasses, getDataMap, getObjEntities, getSuperPkg, getVersionString, getVppConfig, initClassGenerator_1_1, isClient, setClient, setDataMap, setMode, setObjEntities, setSuperPkg, setVersionString, setVppConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentTask

protected org.apache.tools.ant.Task parentTask
Constructor Detail

AntClassGenerator

public AntClassGenerator()
Method Detail

fileForSuperclass

protected java.io.File fileForSuperclass(java.lang.String pkgName,
                                         java.lang.String className)
                                  throws java.lang.Exception
Description copied from class: DefaultClassGenerator
Returns a target file where a generated superclass must be saved. If null is returned, class shouldn't be generated.

Overrides:
fileForSuperclass in class DefaultClassGenerator
Throws:
java.lang.Exception

fileForClass

protected java.io.File fileForClass(java.lang.String pkgName,
                                    java.lang.String className)
                             throws java.lang.Exception
Description copied from class: DefaultClassGenerator
Returns a target file where a generated class must be saved. If null is returned, class shouldn't be generated.

Overrides:
fileForClass in class DefaultClassGenerator
Throws:
java.lang.Exception

getParentTask

public org.apache.tools.ant.Task getParentTask()

setParentTask

public void setParentTask(org.apache.tools.ant.Task parentTask)
Sets the Ant task that uses this generator.

Parameters:
parentTask - An Ant task that provides Ant context to this generator.


Copyright © 2001-2006 Apache.org All Rights Reserved.