edu.umd.cs.findbugs.util
Class Util
java.lang.Object
edu.umd.cs.findbugs.util.Util
public class Util
- extends java.lang.Object
- Author:
- William Pugh
Field Summary |
static boolean |
LOGGING
|
Constructor Summary |
Util()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGING
public static final boolean LOGGING
Util
public Util()
repeat
public static java.lang.String repeat(java.lang.String s,
int number)
runLogAtShutdown
public static void runLogAtShutdown(java.lang.Runnable r)
emptyOrNonnullSingleton
public static <T> java.util.Set<T> emptyOrNonnullSingleton(T t)
immutableMap
public static <K,V> java.util.Map<K,V> immutableMap(java.util.Map<K,V> map)
nullSafeHashcode
public static int nullSafeHashcode(@CheckForNull
java.lang.Object o)
nullSafeEquals
public static <T> boolean nullSafeEquals(@CheckForNull
T o1,
@CheckForNull
T o2)
getReader
public static java.io.Reader getReader(java.io.InputStream in)
throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
getFileReader
public static java.io.Reader getFileReader(java.lang.String filename)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException
- Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
getFileReader
public static java.io.Reader getFileReader(java.io.File filename)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException
- Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
getWriter
public static java.io.Writer getWriter(java.io.OutputStream out)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException
- Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
getFileWriter
public static java.io.Writer getFileWriter(java.lang.String filename)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException
- Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
closeSilently
public static void closeSilently(java.io.InputStream in)
closeSilently
public static void closeSilently(java.io.Reader in)
closeSilently
public static void closeSilently(java.io.OutputStream out)
getXMLType
public static java.lang.String getXMLType(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
makeIOException
public static java.io.IOException makeIOException(java.lang.String msg,
java.lang.Throwable cause)
getFileExtension
public static java.lang.String getFileExtension(java.io.File f)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.