org.eigenbase.resgen
Class AbstractJavaGenerator
java.lang.Object
org.eigenbase.resgen.AbstractGenerator
org.eigenbase.resgen.AbstractJavaGenerator
- All Implemented Interfaces:
- Generator
- Direct Known Subclasses:
- JavaBaseGenerator, JavaLocaleGenerator
abstract class AbstractJavaGenerator
- extends AbstractGenerator
Abstract base for all generators which generate Java code.
- Since:
- 19 September, 2005
- Author:
- jhyde
-
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
className
protected final String className
resourceBundle
protected final ResourceDef.ResourceBundle resourceBundle
baseClassName
protected final String baseClassName
AbstractJavaGenerator
AbstractJavaGenerator(File srcFile,
File file,
String className,
ResourceDef.ResourceBundle resourceBundle,
String baseClassName)
getErrorClass
protected String getErrorClass(ResourceDef.Exception exception)
- Returns the type of error which is to be thrown by this resource.
Result is null if this is not an error.
getPackageName
protected String getPackageName()
getArgTypes
protected String[] getArgTypes(String message)
- Description copied from class:
AbstractGenerator
- Returns the number and types of parameters in the given error message,
expressed as an array of Strings (legal values are
currently "String", "Number", "java.util.Date", and null) ordered by
parameter number.
- Specified by:
getArgTypes
in class AbstractGenerator
generateHeader
protected void generateHeader(PrintWriter pw)
generateFooter
protected void generateFooter(PrintWriter pw,
String className)
getClassName
protected String getClassName()
- Description copied from class:
AbstractGenerator
- Returns the fully-qualified name of the class being generated,
for example "happy.BirthdayResource_en_US".
- Specified by:
getClassName
in class AbstractGenerator
getBaseClassName
protected String getBaseClassName()
- Description copied from class:
AbstractGenerator
- Returns the fully-qualified name of the base class.
- Specified by:
getBaseClassName
in class AbstractGenerator