|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.util.JavaUtils
public class JavaUtils
JavaUtils
Field Summary | |
---|---|
static String[] |
EMPTY_STRING_ARRAY
An empty immutable String array. |
Constructor Summary | |
---|---|
JavaUtils()
|
Method Summary | |
---|---|
static String |
capitalizeFirstChar(String name)
Capitalizes the first character of the name. |
static Class |
getWrapperClass(Class primitive)
|
static boolean |
hasUpperCase(String word)
Check if the word has any uppercase letters |
static int |
indexOfIgnoreCase(String string,
String search)
Scans the parameter string for the parameter search ignoring case when comparing characters. |
static boolean |
isFalse(Object value)
|
static boolean |
isFalse(Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isFalse(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(Object value)
|
static boolean |
isFalseExplicitly(Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isFalseExplicitly(String value)
Tests the String 'value': return 'true' if its null, 'false', '0', or 'no' - else 'false' |
static boolean |
isJavaId(String id)
|
static boolean |
isJavaKeyword(String keyword)
Checks if the input string is a valid java keyword. |
static boolean |
isTrue(Object value)
|
static boolean |
isTrue(Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isTrue(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(Object value)
|
static boolean |
isTrueExplicitly(Object value,
boolean defaultVal)
Tests the Object 'value': if its null, return default. |
static boolean |
isTrueExplicitly(String value)
Tests the String 'value': return 'true' if its 'true', '1', or 'yes' - else 'false' |
static String |
makeNonJavaKeyword(String keyword)
Turns a java keyword string into a non-Java keyword string. |
static String[] |
split(String str,
char separatorChar)
Splits the provided text into an array, separator specified. |
static String |
xmlNameToJava(String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] EMPTY_STRING_ARRAY
String
array.
Constructor Detail |
---|
public JavaUtils()
Method Detail |
---|
public static boolean isJavaKeyword(String keyword)
public static boolean hasUpperCase(String word)
word
-
public static String makeNonJavaKeyword(String keyword)
public static String xmlNameToJava(String name)
public static String capitalizeFirstChar(String name)
name
-
public static final boolean isTrue(String value)
public static final boolean isTrueExplicitly(String value)
public static final boolean isTrueExplicitly(Object value, boolean defaultVal)
public static final boolean isTrueExplicitly(Object value)
public static final boolean isTrue(Object value, boolean defaultVal)
public static final boolean isTrue(Object value)
public static final boolean isFalse(String value)
public static final boolean isFalseExplicitly(String value)
public static final boolean isFalseExplicitly(Object value, boolean defaultVal)
public static final boolean isFalseExplicitly(Object value)
public static final boolean isFalse(Object value, boolean defaultVal)
public static final boolean isFalse(Object value)
public static boolean isJavaId(String id)
public static String[] split(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 Class getWrapperClass(Class primitive)
public static int indexOfIgnoreCase(String string, String search)
string
- search
- If test is empty -1 is always returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |