cascading.util

## Class Util

- java.lang.Object
- - cascading.util.Util

    public class Util
    extends java.lang.Object

Class Util provides reusable operations.

### Nested Class Summary

Nested Classes
`static interface` `Util.RetryOperator<T>`

### Field Summary

Fields
`static java.lang.String` `CONVERT_DOT_TO_PDF` On OS X only, and if the graphviz dot binary is installed, when true, dot will be invoked to convert the dot file to a pdf document.
`static boolean` `HAS_DOT_EXEC`
`static int` `ID_LENGTH`
`static boolean` `IS_OSX`

### Constructor Summary

Constructors
Constructor and Description
`Util()`

### Method Summary

Methods
`static java.util.Set<java.lang.Class<? extends java.lang.Exception>>` `asClasses(java.lang.String classNames, java.lang.String warningMessage)` Converts a given comma separated String of Exception names into a List of classes.
`static <T> java.util.List<T>` `asList(T t, T[] ts)`
`static java.lang.String` `cleansePathName(java.lang.String name)`
`static <T> boolean` `contains(java.lang.Class<T> type, java.util.Collection collection)`
`static <T> boolean` `contains(java.lang.Class<T> type, java.util.Iterator iterator)`
`static boolean` `containsNull(java.lang.Object[] values)`
`static boolean` `containsWhitespace(java.lang.String string)`
`static <T> T[]` `copy(T[] source)`
`static <K,V> java.util.HashMap<K,V>` `createHashMap()`
`static java.lang.String` `createID(byte[] bytes)` Method CreateID returns a HEX hash of the given bytes with length 32 characters long.
`static java.lang.String` `createID(java.lang.String rawID)`
`static <V> java.util.Set<V>` `createIdentitySet()`
`static <V> java.util.Set<V>` `createIdentitySet(java.util.Collection<V> collection)`
`static java.lang.Object` `createProtectedObject(java.lang.Class type, java.lang.Object[] parameters, java.lang.Class[] parameterTypes)`
`static java.lang.String` `createUniqueID()`
`static java.lang.String` `createUniqueIDWhichStartsWithAChar()`
`static <T> java.util.Set<T>` `differenceIdentity(java.util.Set<T> lhs, java.util.Set<T> rhs)`
`static int` `execProcess(java.io.File parentFile, java.lang.String... command)`
`static java.lang.String` `findContainingJar(java.lang.Class<?> type)`
`static java.lang.Class` `findMainClass(java.lang.Class defaultType, java.lang.String packageExclude)`
`static java.lang.String` `findName(java.lang.String path)`
`static java.lang.String` `findVersion(java.lang.String path)`
`static java.lang.String` `formatDurationDHMSms(long duration)`
`static java.lang.String` `formatDurationFromMillis(long duration)`
`static java.lang.String` `formatDurationHMSms(long duration)`
`static java.lang.String` `formatDurationMSms(long duration)`
`static <V> V` `getFirst(java.util.Collection<V> collection)`
`static <V> V` `getFirst(java.util.Iterator<V> iterator)`
`static java.lang.String` `getHex(byte[] bytes)`
`static <V> V` `getLast(java.util.Iterator<V> iterator)`
`static java.lang.String` `getSimpleTypeName(java.lang.reflect.Type type)`
`static long` `getSinkModified(java.lang.Object config, java.util.Collection<Tap> sinks)`
`static long` `getSourceModified(java.lang.Object confCopy, java.util.Iterator<Tap> values, long sinkModified)`
`static java.lang.String` `getTypeName(java.lang.reflect.Type type)`
`static boolean` `hasClass(java.lang.String typeString)`
`static boolean` `hasInstanceMethod(java.lang.Object target, java.lang.String methodName, java.lang.Class[] parameterTypes)`
`static byte[]` `intToByteArray(int value)`
`static <T> T` `invokeConstructor(java.lang.Class<T> target, java.lang.Object[] parameters, java.lang.Class[] parameterTypes)`
`static java.lang.Object` `invokeConstructor(java.lang.String className, java.lang.Object[] parameters, java.lang.Class[] parameterTypes)`
`static java.lang.Object` `invokeInstanceMethod(java.lang.Object target, java.lang.String methodName, java.lang.Object[] parameters, java.lang.Class[] parameterTypes)`
`static java.lang.Object` `invokeInstanceMethodSafe(java.lang.Object target, java.lang.String methodName, java.lang.Object[] parameters, java.lang.Class[] parameterTypes)`
`static java.lang.Object` `invokeStaticMethod(java.lang.Class type, java.lang.String methodName, java.lang.Object[] parameters, java.lang.Class[] parameterTypes)`
`static java.lang.Object` `invokeStaticMethod(java.lang.String typeString, java.lang.String methodName, java.lang.Object[] parameters, java.lang.Class[] parameterTypes)`
`static boolean` `isEmpty(java.lang.String string)`
`static java.lang.String` `join(java.util.Collection collection)` This method joins each value in the collection with a tab character as the delimiter.
`static java.lang.String` `join(java.util.Collection collection, java.lang.String delim)` This method joins each valuein the collection with the given delimiter.
`static java.lang.String` `join(java.util.Collection collection, java.lang.String delim, boolean printNull)`
`static java.lang.String` `join(int[] list, java.lang.String delim)` This method joins the values in the given list with the delim String value.
`static java.lang.String` `join(int[] list, java.lang.String delim, boolean printNull)`
`static java.lang.String` `join(java.lang.Iterable iterable, java.lang.String delim, boolean printNull)`
`static java.lang.String` `join(java.lang.Object[] list, java.lang.String delim)` This method joins the values in the given list with the delim String value.
`static java.lang.String` `join(java.lang.Object[] list, java.lang.String delim, boolean printNull)`
`static java.lang.String` `join(java.lang.Object[] list, java.lang.String delim, boolean printNull, int beginAt)`
`static java.lang.String` `join(java.lang.Object[] list, java.lang.String delim, boolean printNull, int beginAt, int length)`
`static java.lang.String` `join(java.lang.String delim, boolean printNull, java.lang.String... strings)`
`static void` `join(java.lang.StringBuffer buffer, java.util.Collection collection, java.lang.String delim)` This method joins each value in the collection with the given delimiter.
`static void` `join(java.lang.StringBuffer buffer, java.util.Collection collection, java.lang.String delim, boolean printNull)`
`static java.lang.String` `join(java.lang.String delim, java.lang.String... strings)`
`static java.lang.Class<?>` `loadClass(java.lang.String typeString)`
`static java.lang.Class<?>` `loadClassSafe(java.lang.String typeString)`
`static byte[]` `longToByteArray(long value)`
`static java.lang.String` `makePath(java.lang.String prefix, java.lang.String name)`
`static <N extends java.lang.Number> N` `max(java.util.Collection<N> collection)`
`static <N extends java.lang.Number> N` `min(java.util.Collection<N> collection)`
`static <T> java.util.Set<T>` `narrowIdentitySet(java.lang.Class<T> type, java.util.Collection collection)`
`static <T> java.util.Set<T>` `narrowIdentitySet(java.lang.Class<T> type, java.util.Collection collection, boolean include)`
`static <T> java.util.Set<T>` `narrowIdentitySet(java.lang.Class<T> type, java.util.Iterator iterator)`
`static <T> java.util.Set<T>` `narrowIdentitySet(java.lang.Class<T> type, java.util.Iterator iterator, boolean include)`
`static <T> java.util.Set<T>` `narrowSet(java.lang.Class<T> type, java.util.Collection collection)`
`static <T> java.util.Set<T>` `narrowSet(java.lang.Class<T> type, java.util.Collection collection, boolean include)`
`static <T> java.util.Set<T>` `narrowSet(java.lang.Class<T> type, java.util.Iterator iterator)`
`static <T> java.util.Set<T>` `narrowSet(java.lang.Class<T> type, java.util.Iterator iterator, boolean include)`
`static <T> T` `newInstance(java.lang.Class<T> target, java.lang.Object... parameters)`
`static <T> T` `newInstance(java.lang.String className, java.lang.Object... parameters)`
`static java.lang.String` `normalizeUrl(java.lang.String url)` This method attempts to remove duplicate consecutive forward slashes from the given url.
`static java.lang.String` `parseHostname(java.lang.String uri)`
`static java.lang.String` `print(java.util.Collection collection, java.lang.String delim)`
`static void` `print(java.lang.StringBuffer buffer, java.util.Collection collection, java.lang.String delim)`
`static void` `printGraph(java.lang.String filename, org.jgrapht.DirectedGraph graph)`
`static java.util.Collection<java.lang.String>` `quote(java.util.Collection<java.lang.String> collection, java.lang.String quote)`
`static void` `removeAllNulls(java.util.List list)` This method removes all nulls from the given List.
`static java.lang.String[]` `removeNulls(java.lang.String... strings)`
`static <T> T` `retry(org.slf4j.Logger logger, int retries, int secondsDelay, java.lang.String message, Util.RetryOperator<T> operator)`
`static <R> R` `returnInstanceFieldIfExists(java.lang.Object target, java.lang.String fieldName)`
`static <R> R` `returnInstanceFieldIfExistsSafe(java.lang.Object target, java.lang.String fieldName)`
`static <K,V> boolean` `reverseMap(java.util.Map<V,K> from, java.util.Map<K,V> to)`
`static void` `safeSleep(long durationMillis)`
`static java.lang.String` `sanitizeUrl(java.lang.String url)` This method attempts to remove any username and password from the given url String.
`static <R> void` `setInstanceFieldIfExists(java.lang.Object target, java.lang.String fieldName, R value)`
`static <R> boolean` `setInstanceFieldIfExistsSafe(java.lang.Object target, java.lang.String fieldName, R value)`
`static java.lang.String[]` `simpleTypeNames(java.lang.reflect.Type[] types)`
`static <T> java.util.List<T>` `split(java.lang.Class<T> type, java.lang.String values)`
`static <T> java.util.List<T>` `split(java.lang.Class<T> type, java.lang.String delim, java.lang.String values)`
`static java.lang.Boolean` `submitWithTimeout(java.util.concurrent.Callable<java.lang.Boolean> task, int timeout, java.util.concurrent.TimeUnit timeUnit)`
`static java.lang.String` `toNull(java.lang.Object object)` This method returns the `Object.toString()` of the given object, or an empty String if the object is null.
`static java.lang.String` `truncate(java.lang.String string, int maxSize)` This method truncates the given String value to the given size, but appends an ellipse ("...") if the String is larger than maxSize.
`static java.lang.String[]` `typeNames(java.lang.reflect.Type[] types)`
`static java.lang.String` `unique(java.lang.String value, java.lang.String delim)`
`static void` `writeDOT(java.io.Writer writer, org.jgrapht.DirectedGraph graph, IntegerNameProvider vertexIdProvider, VertexNameProvider vertexNameProvider, EdgeNameProvider edgeNameProvider)`
`static void` `writeDOT(java.io.Writer writer, org.jgrapht.DirectedGraph graph, IntegerNameProvider vertexIdProvider, VertexNameProvider vertexNameProvider, EdgeNameProvider edgeNameProvider, ComponentAttributeProvider vertexAttributeProvider, ComponentAttributeProvider edgeAttributeProvider)`
`static void` `writePDF(java.lang.String path)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### CONVERT_DOT_TO_PDF

    public static final java.lang.String CONVERT_DOT_TO_PDF

On OS X only, and if the graphviz dot binary is installed, when true, dot will be invoked to convert the dot file to a pdf document.

See Also:
  Constant Field Values

#### ID_LENGTH

    public static int ID_LENGTH

#### IS_OSX

    public static final boolean IS_OSX

#### HAS_DOT_EXEC

    public static final boolean HAS_DOT_EXEC

### Constructor Detail

#### Util

    public Util()

### Method Detail

#### createHashMap

    public static <K,V> java.util.HashMap<K,V> createHashMap()

#### reverseMap

    public static <K,V> boolean reverseMap(java.util.Map<V,K> from,
                           java.util.Map<K,V> to)

#### createIdentitySet

    public static <V> java.util.Set<V> createIdentitySet()

#### createIdentitySet

    public static <V> java.util.Set<V> createIdentitySet(java.util.Collection<V> collection)

#### getFirst

    public static <V> V getFirst(java.util.Collection<V> collection)

#### getFirst

    public static <V> V getFirst(java.util.Iterator<V> iterator)

#### getLast

    public static <V> V getLast(java.util.Iterator<V> iterator)

#### asList

    public static <T> java.util.List<T> asList(T t,
                               T[] ts)

#### max

    public static <N extends java.lang.Number> N max(java.util.Collection<N> collection)

#### min

    public static <N extends java.lang.Number> N min(java.util.Collection<N> collection)

#### narrowSet

    public static <T> java.util.Set<T> narrowSet(java.lang.Class<T> type,
                                 java.util.Collection collection)

#### narrowIdentitySet

    public static <T> java.util.Set<T> narrowIdentitySet(java.lang.Class<T> type,
                                         java.util.Collection collection)

#### narrowSet

    public static <T> java.util.Set<T> narrowSet(java.lang.Class<T> type,
                                 java.util.Collection collection,
                                 boolean include)

#### narrowIdentitySet

    public static <T> java.util.Set<T> narrowIdentitySet(java.lang.Class<T> type,
                                         java.util.Collection collection,
                                         boolean include)

#### narrowSet

    public static <T> java.util.Set<T> narrowSet(java.lang.Class<T> type,
                                 java.util.Iterator iterator)

#### narrowIdentitySet

    public static <T> java.util.Set<T> narrowIdentitySet(java.lang.Class<T> type,
                                         java.util.Iterator iterator)

#### narrowSet

    public static <T> java.util.Set<T> narrowSet(java.lang.Class<T> type,
                                 java.util.Iterator iterator,
                                 boolean include)

#### narrowIdentitySet

    public static <T> java.util.Set<T> narrowIdentitySet(java.lang.Class<T> type,
                                         java.util.Iterator iterator,
                                         boolean include)

#### contains

    public static <T> boolean contains(java.lang.Class<T> type,
                       java.util.Collection collection)

#### contains

    public static <T> boolean contains(java.lang.Class<T> type,
                       java.util.Iterator iterator)

#### differenceIdentity

    public static <T> java.util.Set<T> differenceIdentity(java.util.Set<T> lhs,
                                          java.util.Set<T> rhs)

#### createUniqueIDWhichStartsWithAChar

    public static java.lang.String createUniqueIDWhichStartsWithAChar()

#### createUniqueID

    public static java.lang.String createUniqueID()

#### createID

    public static java.lang.String createID(java.lang.String rawID)

#### createID

    public static java.lang.String createID(byte[] bytes)

Method CreateID returns a HEX hash of the given bytes with length 32 characters long.

Parameters:
  `bytes` - the bytes
Returns:
  string

#### getHex

    public static java.lang.String getHex(byte[] bytes)

#### longToByteArray

    public static byte[] longToByteArray(long value)

#### intToByteArray

    public static byte[] intToByteArray(int value)

#### copy

    public static <T> T[] copy(T[] source)

#### unique

    public static java.lang.String unique(java.lang.String value,
                          java.lang.String delim)

#### join

    public static java.lang.String join(int[] list,
                        java.lang.String delim)

This method joins the values in the given list with the delim String value.

Parameters:
  `list` -
  `delim` -
Returns:
  String

#### join

    public static java.lang.String join(int[] list,
                        java.lang.String delim,
                        boolean printNull)

#### join

    public static java.lang.String join(java.lang.String delim,
                        java.lang.String... strings)

#### join

    public static java.lang.String join(java.lang.String delim,
                        boolean printNull,
                        java.lang.String... strings)

#### join

    public static java.lang.String join(java.lang.Object[] list,
                        java.lang.String delim)

This method joins the values in the given list with the delim String value.

Parameters:
  `list` -
  `delim` -
Returns:
  a String

#### join

    public static java.lang.String join(java.lang.Object[] list,
                        java.lang.String delim,
                        boolean printNull)

#### join

    public static java.lang.String join(java.lang.Object[] list,
                        java.lang.String delim,
                        boolean printNull,
                        int beginAt)

#### join

    public static java.lang.String join(java.lang.Object[] list,
                        java.lang.String delim,
                        boolean printNull,
                        int beginAt,
                        int length)

#### join

    public static java.lang.String join(java.lang.Iterable iterable,
                        java.lang.String delim,
                        boolean printNull)

#### join

    public static java.lang.String join(java.util.Collection collection)

This method joins each value in the collection with a tab character as the delimiter.

Parameters:
  `collection` -
Returns:
  a String

#### join

    public static java.lang.String join(java.util.Collection collection,
                        java.lang.String delim)

This method joins each valuein the collection with the given delimiter.

Parameters:
  `collection` -
  `delim` -
Returns:
  a String

#### join

    public static java.lang.String join(java.util.Collection collection,
                        java.lang.String delim,
                        boolean printNull)

#### join

    public static void join(java.lang.StringBuffer buffer,
            java.util.Collection collection,
            java.lang.String delim)

This method joins each value in the collection with the given delimiter. All results are appended to the given `StringBuffer` instance.

Parameters:
  `buffer` -
  `collection` -
  `delim` -

#### join

    public static void join(java.lang.StringBuffer buffer,
            java.util.Collection collection,
            java.lang.String delim,
            boolean printNull)

#### split

    public static <T> java.util.List<T> split(java.lang.Class<T> type,
                              java.lang.String values)

#### split

    public static <T> java.util.List<T> split(java.lang.Class<T> type,
                              java.lang.String delim,
                              java.lang.String values)

#### removeNulls

    public static java.lang.String[] removeNulls(java.lang.String... strings)

#### quote

    public static java.util.Collection<java.lang.String> quote(java.util.Collection<java.lang.String> collection,
                                               java.lang.String quote)

#### print

    public static java.lang.String print(java.util.Collection collection,
                         java.lang.String delim)

#### print

    public static void print(java.lang.StringBuffer buffer,
             java.util.Collection collection,
             java.lang.String delim)

#### sanitizeUrl

    public static java.lang.String sanitizeUrl(java.lang.String url)

This method attempts to remove any username and password from the given url String.

Parameters:
  `url` -
Returns:
  a String

#### normalizeUrl

    public static java.lang.String normalizeUrl(java.lang.String url)

This method attempts to remove duplicate consecutive forward slashes from the given url.

Parameters:
  `url` -
Returns:
  a String

#### toNull

    public static java.lang.String toNull(java.lang.Object object)

This method returns the `Object.toString()` of the given object, or an empty String if the object is null.

Parameters:
  `object` -
Returns:
  a String

#### truncate

    public static java.lang.String truncate(java.lang.String string,
                            int maxSize)

This method truncates the given String value to the given size, but appends an ellipse ("...") if the String is larger than maxSize.

Parameters:
  `string` -
  `maxSize` -
Returns:
  a String

#### printGraph

    public static void printGraph(java.lang.String filename,
                  org.jgrapht.DirectedGraph graph)

#### removeAllNulls

    public static void removeAllNulls(java.util.List list)

This method removes all nulls from the given List.

Parameters:
  `list` -

#### writeDOT

    public static void writeDOT(java.io.Writer writer,
                org.jgrapht.DirectedGraph graph,
                IntegerNameProvider vertexIdProvider,
                VertexNameProvider vertexNameProvider,
                EdgeNameProvider edgeNameProvider)

#### writeDOT

    public static void writeDOT(java.io.Writer writer,
                org.jgrapht.DirectedGraph graph,
                IntegerNameProvider vertexIdProvider,
                VertexNameProvider vertexNameProvider,
                EdgeNameProvider edgeNameProvider,
                ComponentAttributeProvider vertexAttributeProvider,
                ComponentAttributeProvider edgeAttributeProvider)

#### isEmpty

    public static boolean isEmpty(java.lang.String string)

#### findVersion

    public static java.lang.String findVersion(java.lang.String path)

#### findName

    public static java.lang.String findName(java.lang.String path)

#### getSourceModified

    public static long getSourceModified(java.lang.Object confCopy,
                         java.util.Iterator<Tap> values,
                         long sinkModified)
                                  throws java.io.IOException

Throws:
  `java.io.IOException`

#### getSinkModified

    public static long getSinkModified(java.lang.Object config,
                       java.util.Collection<Tap> sinks)
                                throws java.io.IOException

Throws:
  `java.io.IOException`

#### getTypeName

    public static java.lang.String getTypeName(java.lang.reflect.Type type)

#### getSimpleTypeName

    public static java.lang.String getSimpleTypeName(java.lang.reflect.Type type)

#### typeNames

    public static java.lang.String[] typeNames(java.lang.reflect.Type[] types)

#### simpleTypeNames

    public static java.lang.String[] simpleTypeNames(java.lang.reflect.Type[] types)

#### containsNull

    public static boolean containsNull(java.lang.Object[] values)

#### safeSleep

    public static void safeSleep(long durationMillis)

#### writePDF

    public static void writePDF(java.lang.String path)

#### execProcess

    public static int execProcess(java.io.File parentFile,
                  java.lang.String... command)

#### formatDurationFromMillis

    public static java.lang.String formatDurationFromMillis(long duration)

#### formatDurationMSms

    public static java.lang.String formatDurationMSms(long duration)

#### formatDurationHMSms

    public static java.lang.String formatDurationHMSms(long duration)

#### formatDurationDHMSms

    public static java.lang.String formatDurationDHMSms(long duration)

#### asClasses

    public static java.util.Set<java.lang.Class<? extends java.lang.Exception>> asClasses(java.lang.String classNames,
                                                                          java.lang.String warningMessage)

Converts a given comma separated String of Exception names into a List of classes. ClassNotFound exceptions are ignored if no warningMessage is given, otherwise logged as a warning.

Parameters:
  `classNames` - A comma separated String of Exception names.
Returns:
  List of Exception classes.

#### submitWithTimeout

    public static java.lang.Boolean submitWithTimeout(java.util.concurrent.Callable<java.lang.Boolean> task,
                                      int timeout,
                                      java.util.concurrent.TimeUnit timeUnit)
                                               throws java.lang.Exception

Throws:
  `java.lang.Exception`

#### retry

    public static <T> T retry(org.slf4j.Logger logger,
              int retries,
              int secondsDelay,
              java.lang.String message,
              Util.RetryOperator<T> operator)
                   throws java.lang.Exception

Throws:
  `java.lang.Exception`

#### createProtectedObject

    public static java.lang.Object createProtectedObject(java.lang.Class type,
                                         java.lang.Object[] parameters,
                                         java.lang.Class[] parameterTypes)

#### hasClass

    public static boolean hasClass(java.lang.String typeString)

#### newInstance

    public static <T> T newInstance(java.lang.String className,
                    java.lang.Object... parameters)

#### newInstance

    public static <T> T newInstance(java.lang.Class<T> target,
                    java.lang.Object... parameters)

#### invokeStaticMethod

    public static java.lang.Object invokeStaticMethod(java.lang.String typeString,
                                      java.lang.String methodName,
                                      java.lang.Object[] parameters,
                                      java.lang.Class[] parameterTypes)

#### loadClass

    public static java.lang.Class<?> loadClass(java.lang.String typeString)

#### loadClassSafe

    public static java.lang.Class<?> loadClassSafe(java.lang.String typeString)

#### invokeStaticMethod

    public static java.lang.Object invokeStaticMethod(java.lang.Class type,
                                      java.lang.String methodName,
                                      java.lang.Object[] parameters,
                                      java.lang.Class[] parameterTypes)

#### hasInstanceMethod

    public static boolean hasInstanceMethod(java.lang.Object target,
                            java.lang.String methodName,
                            java.lang.Class[] parameterTypes)

#### invokeInstanceMethodSafe

    public static java.lang.Object invokeInstanceMethodSafe(java.lang.Object target,
                                            java.lang.String methodName,
                                            java.lang.Object[] parameters,
                                            java.lang.Class[] parameterTypes)

#### invokeInstanceMethod

    public static java.lang.Object invokeInstanceMethod(java.lang.Object target,
                                        java.lang.String methodName,
                                        java.lang.Object[] parameters,
                                        java.lang.Class[] parameterTypes)

#### returnInstanceFieldIfExistsSafe

    public static <R> R returnInstanceFieldIfExistsSafe(java.lang.Object target,
                                        java.lang.String fieldName)

#### invokeConstructor

    public static java.lang.Object invokeConstructor(java.lang.String className,
                                     java.lang.Object[] parameters,
                                     java.lang.Class[] parameterTypes)

#### invokeConstructor

    public static <T> T invokeConstructor(java.lang.Class<T> target,
                          java.lang.Object[] parameters,
                          java.lang.Class[] parameterTypes)

#### returnInstanceFieldIfExists

    public static <R> R returnInstanceFieldIfExists(java.lang.Object target,
                                    java.lang.String fieldName)

#### setInstanceFieldIfExistsSafe

    public static <R> boolean setInstanceFieldIfExistsSafe(java.lang.Object target,
                                           java.lang.String fieldName,
                                           R value)

#### setInstanceFieldIfExists

    public static <R> void setInstanceFieldIfExists(java.lang.Object target,
                                    java.lang.String fieldName,
                                    R value)

#### makePath

    public static java.lang.String makePath(java.lang.String prefix,
                            java.lang.String name)

#### cleansePathName

    public static java.lang.String cleansePathName(java.lang.String name)

#### findMainClass

    public static java.lang.Class findMainClass(java.lang.Class defaultType,
                                java.lang.String packageExclude)

#### findContainingJar

    public static java.lang.String findContainingJar(java.lang.Class<?> type)

#### containsWhitespace

    public static boolean containsWhitespace(java.lang.String string)

#### parseHostname

    public static java.lang.String parseHostname(java.lang.String uri)