Package 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 base for all generators which generate Java code.
- Since:
- 19 September, 2005
- Version:
- $Id: //open/util/resgen/src/org/eigenbase/resgen/AbstractJavaGenerator.java#3 $
- Author:
- jhyde
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String
protected final String
protected final ResourceDef.ResourceBundle
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractJavaGenerator
(File srcFile, File file, String className, ResourceDef.ResourceBundle resourceBundle, String baseClassName) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
generateFooter
(PrintWriter pw, String className) protected void
protected String[]
getArgTypes
(String message) 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.protected String
Returns the fully-qualified name of the base class.protected String
Returns the fully-qualified name of the class being generated, for example "happy.BirthdayResource_en_US".protected String
getErrorClass
(ResourceDef.Exception exception) Returns the type of error which is to be thrown by this resource.protected String
Methods inherited from class org.eigenbase.resgen.AbstractGenerator
generateDoNotModifyHeader, generateGeneratedByBlock, generateResource, getArgumentList, getFile, getParameterList, getSrcFileForComment, setScmSafeComments, useScmSafeComments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eigenbase.resgen.Generator
generateModule
-
Field Details
-
className
-
resourceBundle
-
baseClassName
-
-
Constructor Details
-
AbstractJavaGenerator
AbstractJavaGenerator(File srcFile, File file, String className, ResourceDef.ResourceBundle resourceBundle, String baseClassName)
-
-
Method Details
-
getErrorClass
Returns the type of error which is to be thrown by this resource. Result is null if this is not an error. -
getPackageName
-
getArgTypes
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 classAbstractGenerator
-
generateHeader
-
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 classAbstractGenerator
-
getBaseClassName
Description copied from class:AbstractGenerator
Returns the fully-qualified name of the base class.- Specified by:
getBaseClassName
in classAbstractGenerator
-