|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.util.JavaUtils
public class JavaUtils
JavaUtils
Field Summary | |
---|---|
static java.lang.String[] |
EMPTY_STRING_ARRAY
An empty immutable String array. |
Constructor Summary | |
---|---|
JavaUtils()
|
Method Summary | |
---|---|
static java.lang.String |
callStackToString()
Get a string containing the stack of the current location. |
static java.lang.String |
capitalizeFirstChar(java.lang.String name)
Capitalizes the first character of the name. |
static java.lang.Class |
getWrapperClass(java.lang.Class primitive)
|
static java.lang.Class |
getWrapperClass(java.lang.String primitive)
|
static boolean |
hasUpperCase(java.lang.String word)
Check if the word has any uppercase letters |
static int |
indexOfIgnoreCase(java.lang.String string,
java.lang.String search)
Scans the parameter string for the parameter search ignoring case when comparing characters. |
static boolean |
isFalse(java.lang.Object value)
|
static boolean |
isFalse(java.lang.Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isFalse(java.lang.String value)
Tests the String 'value': return 'true' if its 'false', '0', or 'no' - else 'false' Follow in 'C' tradition of boolean values: false is specific (0), everything else is true; |
static boolean |
isFalseExplicitly(java.lang.Object value)
|
static boolean |
isFalseExplicitly(java.lang.Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isFalseExplicitly(java.lang.String value)
Tests the String 'value': return 'true' if its null, 'false', '0', or 'no' - else 'false' |
static boolean |
isJavaId(java.lang.String id)
|
static boolean |
isJavaKeyword(java.lang.String keyword)
Checks if the input string is a valid java keyword. |
static boolean |
isTrue(java.lang.Object value)
|
static boolean |
isTrue(java.lang.Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isTrue(java.lang.String value)
Tests the String 'value': return 'false' if its 'false', '0', or 'no' - else 'true' Follow in 'C' tradition of boolean values: false is specific (0), everything else is true; |
static boolean |
isTrueExplicitly(java.lang.Object value)
|
static boolean |
isTrueExplicitly(java.lang.Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isTrueExplicitly(java.lang.String value)
Tests the String 'value': return 'true' if its 'true', '1', or 'yes' - else 'false' |
static java.lang.String |
makeNonJavaKeyword(java.lang.String keyword)
Turns a java keyword string into a non-Java keyword string. |
static java.lang.String |
replace(java.lang.String name,
java.lang.String oldT,
java.lang.String newT)
replace: Like String.replace except that the old new items are strings. |
static java.lang.String[] |
split(java.lang.String str,
char separatorChar)
Splits the provided text into an array, separator specified. |
static java.lang.String |
stackToString(java.lang.Throwable e)
Get a string containing the stack of the specified exception |
static java.lang.String |
xmlNameToJava(java.lang.String name)
|
static java.lang.String |
xmlNameToJavaIdentifier(java.lang.String name)
converts an xml name to a java identifier |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] EMPTY_STRING_ARRAY
String
array.
Constructor Detail |
---|
public JavaUtils()
Method Detail |
---|
public static boolean isJavaKeyword(java.lang.String keyword)
public static boolean hasUpperCase(java.lang.String word)
word
-
public static java.lang.String makeNonJavaKeyword(java.lang.String keyword)
public static java.lang.String xmlNameToJava(java.lang.String name)
public static java.lang.String capitalizeFirstChar(java.lang.String name)
name
-
public static java.lang.String xmlNameToJavaIdentifier(java.lang.String name)
name
-
public static boolean isTrue(java.lang.String value)
public static boolean isTrueExplicitly(java.lang.String value)
public static boolean isTrueExplicitly(java.lang.Object value, boolean defaultVal)
public static boolean isTrueExplicitly(java.lang.Object value)
public static boolean isTrue(java.lang.Object value, boolean defaultVal)
public static boolean isTrue(java.lang.Object value)
public static boolean isFalse(java.lang.String value)
public static boolean isFalseExplicitly(java.lang.String value)
public static boolean isFalseExplicitly(java.lang.Object value, boolean defaultVal)
public static boolean isFalseExplicitly(java.lang.Object value)
public static boolean isFalse(java.lang.Object value, boolean defaultVal)
public static boolean isFalse(java.lang.Object value)
public static boolean isJavaId(java.lang.String id)
public static java.lang.String[] split(java.lang.String str, char separatorChar)
Splits the provided text into an array, separator specified. This is an alternative to using StringTokenizer.
The separator is not included in the returned String array. Adjacent separators are treated as one separator.
A null
input String returns null
.
StringUtils.split(null, *) = null StringUtils.split("", *) = [] StringUtils.split("a.b.c", '.') = ["a", "b", "c"] StringUtils.split("a..b.c", '.') = ["a", "b", "c"] StringUtils.split("a:b:c", '.') = ["a:b:c"] StringUtils.split("a\tb\nc", null) = ["a", "b", "c"] StringUtils.split("a b c", ' ') = ["a", "b", "c"]
str
- the String to parse, may be nullseparatorChar
- the character used as the delimiter,
null
splits on whitespace
null
if null String inputpublic static java.lang.Class getWrapperClass(java.lang.Class primitive)
public static java.lang.Class getWrapperClass(java.lang.String primitive)
public static int indexOfIgnoreCase(java.lang.String string, java.lang.String search)
string
- search
- If test is empty -1 is always returned.
public static final java.lang.String replace(java.lang.String name, java.lang.String oldT, java.lang.String newT)
name
- stringoldT
- old text to replacenewT
- new text to use
public static java.lang.String callStackToString()
public static java.lang.String stackToString(java.lang.Throwable e)
e
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |