public class JavaLocaleGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseClassName |
protected String |
className |
protected ResourceDef.ResourceBundle |
resourceBundle |
| Modifier and Type | Method and Description |
|---|---|
protected void |
generateDoNotModifyHeader(PrintWriter pw) |
protected void |
generateFooter(PrintWriter pw,
String className) |
protected void |
generateGeneratedByBlock(PrintWriter pw) |
protected void |
generateHeader(PrintWriter pw) |
void |
generateModule(ResourceGen generator,
ResourceDef.ResourceBundle resourceList,
PrintWriter pw) |
void |
generateResource(ResourceDef.Resource resource,
PrintWriter pw)
Generates code for a particular resource.
|
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 |
getArgumentList(String message) |
protected String |
getBaseClassName()
Returns the fully-qualified name of the base class.
|
protected String |
getClassName()
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 File |
getFile()
Returns the generator's output file.
|
protected String |
getPackageName() |
protected String |
getParameterList(String message)
Returns a parameter list string, e.g.
|
protected String |
getSrcFileForComment()
Returns the XML or .properties source file, in a manner suitable
for use in source code comments.
|
void |
setScmSafeComments(boolean enabled)
Configures whether this generator will output comments that may be
submitted to a source code management system.
|
protected boolean |
useScmSafeComments() |
protected final String className
protected final ResourceDef.ResourceBundle resourceBundle
protected final String baseClassName
public void generateModule(ResourceGen generator, ResourceDef.ResourceBundle resourceList, PrintWriter pw)
public void generateResource(ResourceDef.Resource resource, PrintWriter pw)
resource - Resourcepw - Writerprotected String getErrorClass(ResourceDef.Exception exception)
exception - Exception elementprotected String getPackageName()
protected String[] getArgTypes(String message)
message - Messageprotected void generateHeader(PrintWriter pw)
protected void generateFooter(PrintWriter pw, String className)
protected String getClassName()
protected String getBaseClassName()
public void setScmSafeComments(boolean enabled)
enabled - Whether enabledprotected boolean useScmSafeComments()
protected void generateDoNotModifyHeader(PrintWriter pw)
protected void generateGeneratedByBlock(PrintWriter pw)
protected File getFile()
protected String getSrcFileForComment()
setScmSafeComments(boolean)protected String getParameterList(String message)
message - Message to parseCopyright © 2012–2021 Julian Hyde. All rights reserved.