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(Iterable<String> annotatedWith, ClassLoader... classLoaders)
           
static Field getFieldFromString(String field, ClassLoader... classLoaders)
           
static Member getMemberFromDescriptor(String descriptor, ClassLoader... classLoaders)
           
static Set<Member> getMembersFromDescriptors(Iterable<String> values, ClassLoader... classLoaders)
           
static Set<Method> getMethodsFromDescriptors(Iterable<String> annotatedWith, ClassLoader... classLoaders)
           
static boolean isConstructor(String fqn)
           
static boolean isEmpty(Object[] objects)
           
static boolean isEmpty(String s)
          isEmpty compatible with Java 5
static String name(Class type)
           
static String name(Constructor constructor)
           
static String name(Field field)
           
static String name(Method method)
           
static List<String> names(Class<?>... types)
           
static List<String> names(Iterable<Class<?>> types)
           
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(Iterable<String> annotatedWith,
                                                    ClassLoader... classLoaders)

getConstructorsFromDescriptors

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

getMembersFromDescriptors

public static Set<Member> getMembersFromDescriptors(Iterable<String> values,
                                                    ClassLoader... classLoaders)

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)

isConstructor

public static boolean isConstructor(String fqn)

name

public static String name(Class type)

names

public static List<String> names(Iterable<Class<?>> types)

names

public static List<String> names(Class<?>... types)

name

public static String name(Constructor constructor)

name

public static String name(Method method)

name

public static String name(Field field)


Copyright © 2014. All rights reserved.