MetaTF.Generator.Java
Class Util
java.lang.Object
|
+--MetaTF.Generator.Java.Util
- public class Util
- extends java.lang.Object
Util
General utility static methods
- Version:
- rel-1-2 ($Revision: 1.2 $, $Date: 2000/12/15 16:29:12 $),
- Author:
- Richard Jones
Constructor Summary |
Util()
|
Method Summary |
static java.lang.String |
classify(java.lang.String s)
Convert a name to class form |
static java.lang.String |
constantify(java.lang.String n)
Convert a field name to the constant representation for ALL fields of this name |
static java.lang.String |
declassify(java.lang.String s,
java.util.Map knownFields)
Convert a name to a member form,
handling repeated instances properly |
static java.lang.String |
fieldify(java.lang.String f)
Convert field name to a constant field representation |
static java.lang.String |
firstToUppercase(java.lang.String str,
boolean toUpper)
Change first character of string to uppercase / lowercase |
static java.lang.String |
kindify(java.lang.String str)
|
static java.lang.String |
sectionify(java.lang.String s)
Convert name of a section to an instance form |
static java.lang.String |
typify(java.lang.String str)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Util
public Util()
classify
public static java.lang.String classify(java.lang.String s)
- Convert a name to class form
- Returns:
- the class form of the name
sectionify
public static java.lang.String sectionify(java.lang.String s)
- Convert name of a section to an instance form
- Returns:
- the instance form of the section name
declassify
public static java.lang.String declassify(java.lang.String s,
java.util.Map knownFields)
- Convert a name to a member form,
handling repeated instances properly
- Parameters:
s
- the nameknownFields
- a Map of encountered names and
the suffix to give the next instance of s- Returns:
- the member form of the name
firstToUppercase
public static java.lang.String firstToUppercase(java.lang.String str,
boolean toUpper)
- Change first character of string to uppercase / lowercase
- Parameters:
str
- the string to be changedtoUpper
- if true change first character to uppercase, else to lowercase
typify
public static java.lang.String typify(java.lang.String str)
kindify
public static java.lang.String kindify(java.lang.String str)
constantify
public static java.lang.String constantify(java.lang.String n)
- Convert a field name to the constant representation for ALL fields of this name
- Parameters:
n
- the field name- Returns:
- a constant representation of n
fieldify
public static java.lang.String fieldify(java.lang.String f)
- Convert field name to a constant field representation
- Parameters:
f
- the field name- Returns:
- the constant field representation of t
Copyright © 2001 - Richard Jones MetaTF