public class SwissKnife
extends java.lang.Object
Constructor and Description |
---|
SwissKnife() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
convert(java.lang.String from,
java.lang.Class<T> to)
Convert value to class type value.
|
static <T> T[] |
convertArray(java.lang.String[] from,
java.lang.Class<T> to)
Convert value to an array of type
|
static <T> java.util.Collection<T> |
convertCollection(java.lang.String[] from,
java.lang.Class<T> to)
Convert value to a collection type
|
static java.lang.String |
getRealClassNameLowerCamelCase(java.lang.Object object)
Returns the lower class name.
|
static org.apache.commons.configuration.PropertiesConfiguration |
loadConfigurationInUtf8(java.lang.String fileOrUrlOrClasspathUrl)
This is important: We load stuff as UTF-8.
|
public static org.apache.commons.configuration.PropertiesConfiguration loadConfigurationInUtf8(java.lang.String fileOrUrlOrClasspathUrl)
fileOrUrlOrClasspathUrl
- Location of the file. Can be on file
system, or on the classpath. Will both work.public static java.lang.String getRealClassNameLowerCamelCase(java.lang.Object object)
object
- Object for which to return the lowerCamelCaseNamepublic static <T> java.util.Collection<T> convertCollection(java.lang.String[] from, java.lang.Class<T> to)
from
- string valuesto
- collection type of the classpublic static <T> T[] convertArray(java.lang.String[] from, java.lang.Class<T> to)
from
- string valuesto
- type of arraypublic static <T> T convert(java.lang.String from, java.lang.Class<T> to)
from
- string valueto
- type of the classCopyright © 2016 ninjaframework. All Rights Reserved.