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 class AbstractJavaGenerator
    extends AbstractGenerator

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

Fields
`protected java.lang.String` `baseClassName`
`protected java.lang.String` `className`
`protected ResourceDef.ResourceBundle` `resourceBundle`

### Constructor Summary

Constructors
`AbstractJavaGenerator​(java.io.File srcFile, java.io.File file, java.lang.String className, ResourceDef.ResourceBundle resourceBundle, java.lang.String baseClassName)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `generateFooter​(java.io.PrintWriter pw, java.lang.String className)`
`protected void` `generateHeader​(java.io.PrintWriter pw)`
`protected java.lang.String[]` `getArgTypes​(java.lang.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 java.lang.String` `getBaseClassName()` Returns the fully-qualified name of the base class.
`protected java.lang.String` `getClassName()` Returns the fully-qualified name of the class being generated, for example "happy.BirthdayResource_en_US".
`protected java.lang.String` `getErrorClass​(ResourceDef.Exception exception)` Returns the type of error which is to be thrown by this resource.
`protected java.lang.String` `getPackageName()`

### 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 Detail

#### className

    protected final java.lang.String className

#### resourceBundle

    protected final ResourceDef.ResourceBundle resourceBundle

#### baseClassName

    protected final java.lang.String baseClassName

### Constructor Detail

#### AbstractJavaGenerator

    AbstractJavaGenerator​(java.io.File srcFile,
                          java.io.File file,
                          java.lang.String className,
                          ResourceDef.ResourceBundle resourceBundle,
                          java.lang.String baseClassName)

### Method Detail

#### getErrorClass

    protected java.lang.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 java.lang.String getPackageName()

#### getArgTypes

    protected java.lang.String[] getArgTypes​(java.lang.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​(java.io.PrintWriter pw)

#### generateFooter

    protected void generateFooter​(java.io.PrintWriter pw,
                                  java.lang.String className)

#### getClassName

    protected java.lang.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 java.lang.String getBaseClassName()

Description copied from class: `AbstractGenerator`
Returns the fully-qualified name of the base class.

Specified by:
  `getBaseClassName` in class `AbstractGenerator`