org.reflections.util
Class Utils

java.lang.Object
  extended by org.reflections.util.Utils

public abstract class Utils
extends Object

a garbage can of convenient methods


Constructor Summary
Utils()
           
 
Method Summary
static void close(InputStream closeable)
           
static org.slf4j.Logger findLogger(Class<?> aClass)
           
static Set<Constructor> getConstructorsFromDescriptors(Collection<String> annotatedWith, ClassLoader... classLoaders)
           
static Field getFieldFromString(String field, ClassLoader... classLoaders)
           
static Member getMemberFromDescriptor(String descriptor, ClassLoader... classLoaders)
           
static Set<Method> getMethodsFromDescriptors(Collection<String> annotatedWith, ClassLoader... classLoaders)
           
static
<T> Set<T>
intersect(Collection<T> ts1, Collection<T> ts2)
           
static boolean isConstructor(String fqn)
           
static boolean isEmpty(Object[] objects)
           
static boolean isEmpty(String s)
          isEmpty compatible with Java 5
static File prepareFile(String filename)
           
static String repeat(String string, int times)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

repeat

public static String repeat(String string,
                            int times)

isEmpty

public static boolean isEmpty(String s)
isEmpty compatible with Java 5


isEmpty

public static boolean isEmpty(Object[] objects)

prepareFile

public static File prepareFile(String filename)

getMemberFromDescriptor

public static Member getMemberFromDescriptor(String descriptor,
                                             ClassLoader... classLoaders)
                                      throws ReflectionsException
Throws:
ReflectionsException

getMethodsFromDescriptors

public static Set<Method> getMethodsFromDescriptors(Collection<String> annotatedWith,
                                                    ClassLoader... classLoaders)

getConstructorsFromDescriptors

public static Set<Constructor> getConstructorsFromDescriptors(Collection<String> annotatedWith,
                                                              ClassLoader... classLoaders)

isConstructor

public static boolean isConstructor(String fqn)

getFieldFromString

public static Field getFieldFromString(String field,
                                       ClassLoader... classLoaders)

close

public static void close(InputStream closeable)

findLogger

@Nullable
public static org.slf4j.Logger findLogger(Class<?> aClass)

intersect

public static <T> Set<T> intersect(Collection<T> ts1,
                                   Collection<T> ts2)


Copyright © 2013. All Rights Reserved.