Package org.eigenbase.resgen
Class ResourceGen
java.lang.Object
org.eigenbase.resgen.ResourceGen
ResourceGen parses an XML file containing error messages, and
generates .java file to access the errors. Usage:For example,ResourceGen xmlFile
java org.eigenbase.resgen.ResourceGen MyResource_en.xml
This will create class MyResource, with a
function corresponding to each error message in
MyResource_en.xml.
See also the ANT Task, ResourceGenTask.
- Since:
- 3 December, 2001
- Version:
- $Id: //open/util/resgen/src/org/eigenbase/resgen/ResourceGen.java#7 $
- Author:
- jhyde
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidPrints a message to the output stream.(package private) FileTaskcreatePropertiesTask(ResourceGenTask.Include include, String fileName) (package private) FileTaskcreateXmlTask(ResourceGenTask.Include include, String fileName, String className, String baseClassName, boolean outputJava, String cppClassName, String cppBaseClassName, boolean outputCpp) (package private) static StringgetComment(ResourceDef.Resource resource) Returns any comment relating to the message.(package private) static StringgetResourceInitcap(ResourceDef.Resource resource) Returns the name of the resource with the first letter capitalized, suitable for use in method names.static void(package private) static ResourceGenTask(package private) voidrun(ResourceGenTask rootArgs)
-
Constructor Details
-
ResourceGen
public ResourceGen()
-
-
Method Details
-
main
- Throws:
IOException
-
parse
-
run
- Throws:
IOException
-
comment
Prints a message to the output stream. -
getResourceInitcap
Returns the name of the resource with the first letter capitalized, suitable for use in method names. For example, "MyErrorMessage". -
getComment
Returns any comment relating to the message. -
createXmlTask
-
createPropertiesTask
-