|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.g11ntoolkit.xlclassname.XLClassName
Find the class name in the specified file and replace it with the file name.
We assume that the class name must be the same as the file name. We also assume that the file name is correct for this class and that it already contains the language identifier.
You must specify the locale for the file if the encoding for the file is something other than ISO-8859-1.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See License Agreement.
| Field Summary | |
private static java.util.logging.Logger |
log
The log used for all messages from this class. |
private static java.util.ResourceBundle |
mrb
Messages used by tools and classes. |
private static java.util.ResourceBundle |
vrb
Constants and variables used by tools and classes. |
| Constructor Summary | |
XLClassName()
Create an instance of the XLClassName tool. |
|
| Method Summary | |
static java.lang.StringBuffer |
fileBuf(java.lang.String inFileName,
java.lang.String localeString)
This method is used to load the input file into a buffer for processing. |
static void |
main(java.lang.String[] args)
Allows this tool to be run from the command line. |
static java.lang.StringBuffer |
run(java.lang.String inFileName,
java.lang.String localeString)
Translates of the class name in the specified file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.util.logging.Logger log
private static java.util.ResourceBundle mrb
private static java.util.ResourceBundle vrb
| Constructor Detail |
public XLClassName()
| Method Detail |
public static void main(java.lang.String[] args)
Sets up the environment then calls the run method to do the work.
args - a String containing the command line parameters.
public static java.lang.StringBuffer run(java.lang.String inFileName,
java.lang.String localeString)
throws XLCNRunError
This method assumes that the file name is correct for the specified locale. It finds the class name in the source code and replaces it with the file name.
inFileName - a String containing the name of the input file.localeString - a String containing the locale code string. This must be a valid locale code.
XLCNRunError - for any error detected during the processing.
public static java.lang.StringBuffer fileBuf(java.lang.String inFileName,
java.lang.String localeString)
throws FileBufferError
inFileName - a String containing the name of the input file.localeString - a String containing the locale identifier. This must be a valid locale identifier.
FileBufferError - for any I/O error in the input file.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||