public class SpincastStatics extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
SpincastStatics() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(Closeable closeable) |
static void |
closeQuietly(InputStream stream) |
static void |
closeQuietly(OutputStream stream) |
static void |
closeQuietly(Reader reader) |
void |
closeQuietlyInstance(Closeable closeable) |
void |
closeQuietlyInstance(InputStream stream) |
void |
closeQuietlyInstance(OutputStream stream) |
void |
closeQuietlyInstance(Reader reader) |
static Set<Method> |
getAllMethods(Class<?> clazz)
Gets *all* the methods of a clazz, for all visibilities
and for all the parents hierarchy.
|
protected Set<Method> |
getAllMethodsInstance(Class<?> clazz) |
static File |
getClasspathFile(String relativePath)
Gets a file on the classpath.
|
File |
getClasspathFileInstance(String relativePath) |
protected static SpincastStatics |
getInstance() |
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat |
getIso8601DateParser1() |
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat |
getIso8601DateParser2() |
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat |
getIso8601DateParser3() |
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat |
getIso8601DateParser4() |
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat |
getIso8601DateParser5() |
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat |
getIso8601DateParser6() |
static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat |
getIso8601DateParserDefault() |
static String |
getStackTrace(Throwable ex)
Gets the stack trace of an Exception.
|
protected String |
getStackTraceInstance(Throwable ex) |
static Long |
longValueOrNull(Object obj)
Returns
null if the specified object
is null or uses Long.parseLong(String) otherwise,
by casting the obj using obj.toString() |
Long |
longValueOrNullInstance(Object obj) |
protected RuntimeException |
manageInterruptedException(Exception ex)
Return
null to continue the exception processing or
an exception to be returned immediatly. |
static <K,V> Map<K,V> |
map(K key1,
V value1)
Creates a map.
|
static <K,V> Map<K,V> |
map(K key1,
V value1,
K key2,
V value2)
Creates a map.
|
static <K,V> Map<K,V> |
map(K key1,
V value1,
K key2,
V value2,
K key3,
V value3)
Creates a map.
|
static <K,V> Map<K,V> |
map(K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4)
Creates a map.
|
static <K,V> Map<K,V> |
map(K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4,
K key5,
V value5)
Creates a map.
|
protected <K,V> Map<K,V> |
mapInstance(K key1,
V value1) |
protected <K,V> Map<K,V> |
mapInstance(K key1,
V value1,
K key2,
V value2) |
protected <K,V> Map<K,V> |
mapInstance(K key1,
V value1,
K key2,
V value2,
K key3,
V value3) |
protected <K,V> Map<K,V> |
mapInstance(K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4) |
protected <K,V> Map<K,V> |
mapInstance(K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4,
K key5,
V value5) |
static Map<String,Object> |
params(String key1,
Object value1)
Creates a Map<String, Object> map.
|
static Map<String,Object> |
params(String key1,
Object value1,
String key2,
Object value2)
Creates a Map<String, Object> map.
|
static Map<String,Object> |
params(String key1,
Object value1,
String key2,
Object value2,
String key3,
Object value3)
Creates a Map<String, Object> map.
|
static Map<String,Object> |
params(String key1,
Object value1,
String key2,
Object value2,
String key3,
Object value3,
String key4,
Object value4)
Creates a Map<String, Object> map.
|
static Map<String,Object> |
params(String key1,
Object value1,
String key2,
Object value2,
String key3,
Object value3,
String key4,
Object value4,
String key5,
Object value5)
Creates a Map<String, Object> map.
|
static Date |
parseISO8601date(String str)
Parse a ISO 8601 string representation of a date
to a Date object.
|
Date |
parseISO8601dateInstance(String str) |
static RuntimeException |
runtimize(Exception ex) |
protected RuntimeException |
runtimizePrivate(Exception ex) |
static void |
setInstance(SpincastStatics instance) |
static String |
stringValueOrNull(Object obj)
Returns
null if the specified object
is null or uses String.valueOf(Object) otherwise. |
String |
stringValueOrNullInstance(Object obj) |
static <T> T[] |
toArray(Set<T> set,
Class<T> clazz) |
<T> T[] |
toArrayInstance(Set<T> set,
Class<T> clazz) |
protected static SpincastStatics getInstance()
public static void setInstance(SpincastStatics instance)
public static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParserDefault()
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser1()
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser2()
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser3()
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser4()
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser5()
protected static org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser6()
public static RuntimeException runtimize(Exception ex)
protected RuntimeException runtimizePrivate(Exception ex)
protected RuntimeException manageInterruptedException(Exception ex)
null to continue the exception processing or
an exception to be returned immediatly.public static String getStackTrace(Throwable ex)
public static <K,V> Map<K,V> map(K key1, V value1)
public static Map<String,Object> params(String key1, Object value1)
protected <K,V> Map<K,V> mapInstance(K key1, V value1)
public static <K,V> Map<K,V> map(K key1, V value1, K key2, V value2)
public static Map<String,Object> params(String key1, Object value1, String key2, Object value2)
protected <K,V> Map<K,V> mapInstance(K key1, V value1, K key2, V value2)
public static <K,V> Map<K,V> map(K key1, V value1, K key2, V value2, K key3, V value3)
public static Map<String,Object> params(String key1, Object value1, String key2, Object value2, String key3, Object value3)
protected <K,V> Map<K,V> mapInstance(K key1, V value1, K key2, V value2, K key3, V value3)
public static <K,V> Map<K,V> map(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
public static Map<String,Object> params(String key1, Object value1, String key2, Object value2, String key3, Object value3, String key4, Object value4)
protected <K,V> Map<K,V> mapInstance(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
public static <K,V> Map<K,V> map(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4, K key5, V value5)
public static Map<String,Object> params(String key1, Object value1, String key2, Object value2, String key3, Object value3, String key4, Object value4, String key5, Object value5)
protected <K,V> Map<K,V> mapInstance(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4, K key5, V value5)
public static Set<Method> getAllMethods(Class<?> clazz)
public static Date parseISO8601date(String str)
public static void closeQuietly(InputStream stream)
public void closeQuietlyInstance(InputStream stream)
public static void closeQuietly(OutputStream stream)
public void closeQuietlyInstance(OutputStream stream)
public static void closeQuietly(Reader reader)
public void closeQuietlyInstance(Reader reader)
public static void closeQuietly(Closeable closeable)
public void closeQuietlyInstance(Closeable closeable)
public static String stringValueOrNull(Object obj)
null if the specified object
is null or uses String.valueOf(Object) otherwise.public static Long longValueOrNull(Object obj)
null if the specified object
is null or uses Long.parseLong(String) otherwise,
by casting the obj using obj.toString()public static File getClasspathFile(String relativePath)
Copyright © 2018. All rights reserved.