FreeHEP API
Version current

org.freehep.aid
Class AbstractJavaGenerator

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

public abstract class AbstractJavaGenerator
extends AbstractGenerator

Version:
$Id: AbstractJavaGenerator.java,v 1.23 2005/06/07 17:26:57 duns Exp $
Author:
Mark Donszelmann
Source Code:
AbstractJavaGenerator.java

Field Summary
protected  UserProperties importProperties
           
protected static String language
           
protected  UserProperties primitiveProperties
           
protected  UserProperties templateProperties
           
protected  UserProperties typeProperties
           
protected  UserProperties valueProperties
           
 
Fields inherited from class org.freehep.aid.AbstractGenerator
properties
 
Constructor Summary
AbstractJavaGenerator(String propDir)
           
 
Method Summary
 String directory(IClass clazz)
           
abstract  String filename(IClass clazz)
           
protected  String[] getConcrete(IClass clazz)
           
protected  Map getTemplateMap(String[] templateParameters, String concrete)
           
protected  void importFrom(IType type, String packageName, SortedSet imports)
           
protected  void importFrom(String name, String packageName, SortedSet imports)
           
protected  boolean isClass(IClass clazz)
           
protected  String namedType(INamedType namedType, Map template, boolean useFullyQualifiedNames)
           
 boolean print(File file, IClass clazz)
           
protected abstract  void printClassHeader(IndentPrintWriter out, IClass clazz)
           
protected  void printEOCComments(IndentPrintWriter out, IClass clazz)
           
protected  void printEOFComments(IndentPrintWriter out, IClass clazz)
           
protected  void printEOPComments(IndentPrintWriter out, IClass clazz)
           
protected  void printField(IndentPrintWriter out, IField field, boolean innerClass)
           
protected  void printImportStatements(IndentPrintWriter out, IClass clazz)
           
protected  void printMethod(IndentPrintWriter out, IClass clazz, IMethod method, boolean useFullyQualifiedNames)
           
protected  void printMethod(IndentPrintWriter out, IClass clazz, IMethod method, boolean useFullyQualifiedNames, int noOfParameters)
           
protected  void printMethodBody(IndentPrintWriter out, IClass clazz, IMethod method, int noOfParameters)
           
protected  void printMethodComments(IndentPrintWriter out, IMethod method, int noOfParameters)
           
protected  void printMethodHeader(IndentPrintWriter out, IClass clazz, IMethod method, boolean useFullyQualifiedNames, int noOfParameters)
           
protected  String type(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 UserProperties importProperties

typeProperties

protected UserProperties typeProperties

valueProperties

protected UserProperties valueProperties

templateProperties

protected UserProperties templateProperties

primitiveProperties

protected UserProperties primitiveProperties
Constructor Detail

AbstractJavaGenerator

public AbstractJavaGenerator(String propDir)
Method Detail

directory

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

filename

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

isClass

protected boolean isClass(IClass clazz)

print

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

printClassHeader

protected abstract void printClassHeader(IndentPrintWriter out,
                                         IClass clazz)

printEOCComments

protected void printEOCComments(IndentPrintWriter out,
                                IClass clazz)

printEOPComments

protected void printEOPComments(IndentPrintWriter out,
                                IClass clazz)

printEOFComments

protected void printEOFComments(IndentPrintWriter out,
                                IClass clazz)

printImportStatements

protected void printImportStatements(IndentPrintWriter out,
                                     IClass clazz)

importFrom

protected void importFrom(IType type,
                          String packageName,
                          SortedSet imports)

importFrom

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

printMethod

protected void printMethod(IndentPrintWriter out,
                           IClass clazz,
                           IMethod method,
                           boolean useFullyQualifiedNames)

printMethod

protected void printMethod(IndentPrintWriter out,
                           IClass clazz,
                           IMethod method,
                           boolean useFullyQualifiedNames,
                           int noOfParameters)

printMethodComments

protected void printMethodComments(IndentPrintWriter out,
                                   IMethod method,
                                   int noOfParameters)

printMethodHeader

protected void printMethodHeader(IndentPrintWriter out,
                                 IClass clazz,
                                 IMethod method,
                                 boolean useFullyQualifiedNames,
                                 int noOfParameters)

printMethodBody

protected void printMethodBody(IndentPrintWriter out,
                               IClass clazz,
                               IMethod method,
                               int noOfParameters)

printField

protected void printField(IndentPrintWriter out,
                          IField field,
                          boolean innerClass)

namedType

protected String namedType(INamedType namedType,
                           Map template,
                           boolean useFullyQualifiedNames)

type

protected String type(IType type,
                      Map template,
                      boolean useFullyQualifiedNames)

getConcrete

protected String[] getConcrete(IClass clazz)

getTemplateMap

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

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.