org.freehep.aid
Class AbstractJavaGenerator

java.lang.Object
  extended by org.freehep.aid.AbstractGenerator
      extended by org.freehep.aid.AbstractJavaGenerator
All Implemented Interfaces:
org.freehep.rtti.Generator
Direct Known Subclasses:
JavaClassGenerator, JavaInterfaceGenerator

public abstract class AbstractJavaGenerator
extends AbstractGenerator

Version:
$Id: AbstractJavaGenerator.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann

Field Summary
protected  org.freehep.util.UserProperties importProperties
           
protected static String language
           
protected  org.freehep.util.UserProperties primitiveProperties
           
protected  org.freehep.util.UserProperties templateProperties
           
protected  org.freehep.util.UserProperties typeProperties
           
protected  org.freehep.util.UserProperties valueProperties
           
 
Fields inherited from class org.freehep.aid.AbstractGenerator
properties
 
Constructor Summary
AbstractJavaGenerator(String propDir)
           
 
Method Summary
 String directory(org.freehep.rtti.IClass clazz)
           
abstract  String filename(org.freehep.rtti.IClass clazz)
           
protected  String[] getConcrete(org.freehep.rtti.IClass clazz)
           
protected  Map getTemplateMap(String[] templateParameters, String concrete)
           
protected  void importFrom(org.freehep.rtti.IType type, String packageName, SortedSet imports)
           
protected  void importFrom(String name, String packageName, SortedSet imports)
           
protected  boolean isClass(org.freehep.rtti.IClass clazz)
           
protected  String namedType(org.freehep.rtti.INamedType namedType, Map template, boolean useFullyQualifiedNames)
           
 boolean print(File file, org.freehep.rtti.IClass clazz)
           
protected abstract  void printClassHeader(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz)
           
protected  void printEOCComments(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz)
           
protected  void printEOFComments(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz)
           
protected  void printEOPComments(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz)
           
protected  void printField(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IField field, boolean innerClass)
           
protected  void printImportStatements(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz)
           
protected  void printMethod(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz, org.freehep.rtti.IMethod method, boolean useFullyQualifiedNames)
           
protected  void printMethod(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz, org.freehep.rtti.IMethod method, boolean useFullyQualifiedNames, int noOfParameters)
           
protected  void printMethodBody(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz, org.freehep.rtti.IMethod method, int noOfParameters)
           
protected  void printMethodComments(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IMethod method, int noOfParameters)
           
protected  void printMethodHeader(org.freehep.util.io.IndentPrintWriter out, org.freehep.rtti.IClass clazz, org.freehep.rtti.IMethod method, boolean useFullyQualifiedNames, int noOfParameters)
           
protected  String type(org.freehep.rtti.IType type, Map template, boolean useFullyQualifiedNames)
           
 
Methods inherited from class org.freehep.aid.AbstractGenerator
getProperties, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

language

protected static final String language
See Also:
Constant Field Values

importProperties

protected org.freehep.util.UserProperties importProperties

typeProperties

protected org.freehep.util.UserProperties typeProperties

valueProperties

protected org.freehep.util.UserProperties valueProperties

templateProperties

protected org.freehep.util.UserProperties templateProperties

primitiveProperties

protected org.freehep.util.UserProperties primitiveProperties
Constructor Detail

AbstractJavaGenerator

public AbstractJavaGenerator(String propDir)
Method Detail

directory

public String directory(org.freehep.rtti.IClass clazz)
Specified by:
directory in interface org.freehep.rtti.Generator
Overrides:
directory in class AbstractGenerator

filename

public abstract String filename(org.freehep.rtti.IClass clazz)
Specified by:
filename in interface org.freehep.rtti.Generator
Specified by:
filename in class AbstractGenerator

isClass

protected boolean isClass(org.freehep.rtti.IClass clazz)

print

public boolean print(File file,
                     org.freehep.rtti.IClass clazz)
              throws IOException
Specified by:
print in interface org.freehep.rtti.Generator
Specified by:
print in class AbstractGenerator
Throws:
IOException

printClassHeader

protected abstract void printClassHeader(org.freehep.util.io.IndentPrintWriter out,
                                         org.freehep.rtti.IClass clazz)

printEOCComments

protected void printEOCComments(org.freehep.util.io.IndentPrintWriter out,
                                org.freehep.rtti.IClass clazz)

printEOPComments

protected void printEOPComments(org.freehep.util.io.IndentPrintWriter out,
                                org.freehep.rtti.IClass clazz)

printEOFComments

protected void printEOFComments(org.freehep.util.io.IndentPrintWriter out,
                                org.freehep.rtti.IClass clazz)

printImportStatements

protected void printImportStatements(org.freehep.util.io.IndentPrintWriter out,
                                     org.freehep.rtti.IClass clazz)

importFrom

protected void importFrom(org.freehep.rtti.IType type,
                          String packageName,
                          SortedSet imports)

importFrom

protected void importFrom(String name,
                          String packageName,
                          SortedSet imports)

printMethod

protected void printMethod(org.freehep.util.io.IndentPrintWriter out,
                           org.freehep.rtti.IClass clazz,
                           org.freehep.rtti.IMethod method,
                           boolean useFullyQualifiedNames)

printMethod

protected void printMethod(org.freehep.util.io.IndentPrintWriter out,
                           org.freehep.rtti.IClass clazz,
                           org.freehep.rtti.IMethod method,
                           boolean useFullyQualifiedNames,
                           int noOfParameters)

printMethodComments

protected void printMethodComments(org.freehep.util.io.IndentPrintWriter out,
                                   org.freehep.rtti.IMethod method,
                                   int noOfParameters)

printMethodHeader

protected void printMethodHeader(org.freehep.util.io.IndentPrintWriter out,
                                 org.freehep.rtti.IClass clazz,
                                 org.freehep.rtti.IMethod method,
                                 boolean useFullyQualifiedNames,
                                 int noOfParameters)

printMethodBody

protected void printMethodBody(org.freehep.util.io.IndentPrintWriter out,
                               org.freehep.rtti.IClass clazz,
                               org.freehep.rtti.IMethod method,
                               int noOfParameters)

printField

protected void printField(org.freehep.util.io.IndentPrintWriter out,
                          org.freehep.rtti.IField field,
                          boolean innerClass)

namedType

protected String namedType(org.freehep.rtti.INamedType namedType,
                           Map template,
                           boolean useFullyQualifiedNames)

type

protected String type(org.freehep.rtti.IType type,
                      Map template,
                      boolean useFullyQualifiedNames)

getConcrete

protected String[] getConcrete(org.freehep.rtti.IClass clazz)

getTemplateMap

protected Map getTemplateMap(String[] templateParameters,
                             String concrete)


Copyright © 2000-2007 FreeHEP. All Rights Reserved.