public class Mirror
extends java.lang.Object
| Constructor and Description |
|---|
Mirror() |
| Modifier and Type | Method and Description |
|---|---|
static <T> MirrorClass<T> |
of(java.lang.Class<T> clazz)
Creates a mirror of the given class
|
static <T> MirrorConstructor<T> |
of(java.lang.reflect.Constructor<T> constructor)
Creates a mirror of the given constructor
|
static MirrorField |
of(java.lang.reflect.Field f)
Creates a mirror of the given field
|
static MirrorMethod |
of(java.lang.reflect.Method m)
Creates a
MirrorMethod from the given Java Method |
static ClassStream |
ofAll(java.util.Collection<MirrorClass<?>> classes)
Creates a stream of
MirrorClasses from the given collection of mirror classes |
static ClassStream |
ofAll(MirrorClass<?>... classes)
Creates a stream of
MirrorClasses from the given array of mirror classes |
static ClassStream |
ofAll(java.util.stream.Stream<MirrorClass<?>> classes)
Creates a stream of
MirrorClasses from the given stream of mirror classes |
static FieldStream |
ofAllFields(java.util.Collection<MirrorField> fields)
Creates a stream of
MirrorFields from the given collection of mirror fields |
static FieldStream |
ofAllFields(MirrorField... fields)
Creates a stream of
MirrorFields from the given array of mirror fields |
static FieldStream |
ofAllFields(java.util.stream.Stream<MirrorField> fields)
Creates a stream of
MirrorFields from the given stream of mirror fields |
static ClassStream |
ofAllInJar(java.io.File jar)
Creates a stream of all the
MirrorClasses in the given jar using the context class loader |
static ClassStream |
ofAllInJar(java.io.File jar,
java.lang.ClassLoader classLoader)
Creates a stream of all the
MirrorClasses in the given jar to be loaded using the given class loader |
static ClassStream |
ofAllInPackage(java.lang.String thePackage)
Creates a stream of all the
MirrorClasses in the given package |
static MethodStream |
ofAllMethods(java.util.Collection<MirrorMethod> methods)
Creates a stream of
MirrorMethods from the given collection of mirror methods |
static MethodStream |
ofAllMethods(MirrorMethod... methods)
Creates a stream of
MirrorMethods from the given array of mirror methods |
static MethodStream |
ofAllMethods(java.util.stream.Stream<MirrorMethod> methods)
Creates a stream of
MirrorMethods from the given stream of mirror methods |
static ClassStream |
ofAllUnwrapped(java.lang.Class<?>... classes)
Creates a stream of
MirrorClasses from the given array of Java Classes |
static ClassStream |
ofAllUnwrapped(java.util.Collection<java.lang.Class<?>> classes)
Creates a stream of
MirrorClasses from the given collection of Java Classes |
static <I> ClassStream |
ofAllUnwrapped(Scanner<java.lang.Class<?>,I> scanner,
I input)
Creates a stream of
MirrorClasses from the given Class scanner and scanner input |
static ClassStream |
ofAllUnwrapped(java.util.stream.Stream<java.lang.Class<?>> classes)
Creates a stream of
MirrorClasses from the given stream of Java Classes |
static FieldStream |
ofAllUnwrappedFields(java.util.Collection<java.lang.reflect.Field> fields)
Creates a stream of
MirrorFields from the given collection of Java Fields |
static FieldStream |
ofAllUnwrappedFields(java.lang.reflect.Field... fields)
Creates a stream of
MirrorFields from the given array of Java Fields |
static <I> FieldStream |
ofAllUnwrappedFields(Scanner<java.lang.reflect.Field,I> scanner,
I input)
Creates a stream of
MirrorFields from the given Field scanner and input |
static FieldStream |
ofAllUnwrappedFields(java.util.stream.Stream<java.lang.reflect.Field> fields)
Creates a stream of
MirrorFields from the given stream of Java Fields |
static MethodStream |
ofAllUnwrappedMethods(java.util.Collection<java.lang.reflect.Method> methods)
Creates a stream of
MirrorMethods from the given collection of Java Methods |
static MethodStream |
ofAllUnwrappedMethods(java.lang.reflect.Method... methods)
Creates a stream of
MirrorMethods from the given array of Java Methods |
static <I> MethodStream |
ofAllUnwrappedMethods(Scanner<java.lang.reflect.Method,I> scanner,
I input)
Creates a stream of
MirrorMethods from the given Method scanner and input |
static MethodStream |
ofAllUnwrappedMethods(java.util.stream.Stream<java.lang.reflect.Method> methods)
Creates a stream of
MirrorMethods from the given stream of Java Methods |
static <E extends java.lang.Enum<E>> |
ofEnum(java.lang.Class<E> clazz)
Creates a mirror of the given
enum class |
public static <T> MirrorClass<T> of(java.lang.Class<T> clazz)
T - The type of the classclazz - The classpublic static ClassStream ofAll(java.util.stream.Stream<MirrorClass<?>> classes)
MirrorClasses from the given stream of mirror classesclasses - The stream to use as the underlying stream for the ClassStreampublic static ClassStream ofAll(java.util.Collection<MirrorClass<?>> classes)
MirrorClasses from the given collection of mirror classesclasses - The collection of classes to create the stream forpublic static ClassStream ofAll(MirrorClass<?>... classes)
MirrorClasses from the given array of mirror classesclasses - The array of classes to create the stream forpublic static ClassStream ofAllUnwrapped(java.util.stream.Stream<java.lang.Class<?>> classes)
MirrorClasses from the given stream of Java Classesclasses - The stream of classes to create the stream forpublic static ClassStream ofAllUnwrapped(java.util.Collection<java.lang.Class<?>> classes)
MirrorClasses from the given collection of Java Classesclasses - The collection of classes to create the stream forpublic static <I> ClassStream ofAllUnwrapped(Scanner<java.lang.Class<?>,I> scanner, I input)
MirrorClasses from the given Class scanner and scanner inputI - The type of scanner inputscanner - The scanner to useinput - The input for the scannerpublic static ClassStream ofAllUnwrapped(java.lang.Class<?>... classes)
MirrorClasses from the given array of Java Classesclasses - The array of classes to create the stream forpublic static ClassStream ofAllInPackage(java.lang.String thePackage)
MirrorClasses in the given packagethePackage - The package to search inpublic static ClassStream ofAllInJar(java.io.File jar, java.lang.ClassLoader classLoader)
MirrorClasses in the given jar to be loaded using the given class loaderjar - The jar to search inclassLoader - The class loader to use to load the classespublic static ClassStream ofAllInJar(java.io.File jar)
MirrorClasses in the given jar using the context class loaderjar - THe jar to search inpublic static <E extends java.lang.Enum<E>> MirrorEnum<E> ofEnum(java.lang.Class<E> clazz)
enum classE - The type of the enumclazz - The enum classpublic static MirrorField of(java.lang.reflect.Field f)
f - The fieldpublic static FieldStream ofAllFields(java.util.stream.Stream<MirrorField> fields)
MirrorFields from the given stream of mirror fieldsfields - The stream to use as the underlying stream for the FieldStreampublic static FieldStream ofAllFields(java.util.Collection<MirrorField> fields)
MirrorFields from the given collection of mirror fieldsfields - The collection of fields to create the stream frompublic static FieldStream ofAllFields(MirrorField... fields)
MirrorFields from the given array of mirror fieldsfields - The array of fields to create the stream frompublic static FieldStream ofAllUnwrappedFields(java.util.stream.Stream<java.lang.reflect.Field> fields)
MirrorFields from the given stream of Java Fieldsfields - The stream of fields to usepublic static FieldStream ofAllUnwrappedFields(java.util.Collection<java.lang.reflect.Field> fields)
MirrorFields from the given collection of Java Fieldsfields - The collection of fields to create the stream frompublic static <I> FieldStream ofAllUnwrappedFields(Scanner<java.lang.reflect.Field,I> scanner, I input)
MirrorFields from the given Field scanner and inputI - The type of the inputscanner - The scanner to useinput - The input for the scannerpublic static FieldStream ofAllUnwrappedFields(java.lang.reflect.Field... fields)
MirrorFields from the given array of Java Fieldsfields - The array of fields to create the stream frompublic static MirrorMethod of(java.lang.reflect.Method m)
MirrorMethod from the given Java Methodm - The methodpublic static MethodStream ofAllMethods(java.util.stream.Stream<MirrorMethod> methods)
MirrorMethods from the given stream of mirror methodsmethods - The stream to use as the underlying stream for the MethodStreampublic static MethodStream ofAllMethods(java.util.Collection<MirrorMethod> methods)
MirrorMethods from the given collection of mirror methodsmethods - The collection of methods to create the stream frompublic static MethodStream ofAllMethods(MirrorMethod... methods)
MirrorMethods from the given array of mirror methodsmethods - The array of methods to create the stream frompublic static MethodStream ofAllUnwrappedMethods(java.util.stream.Stream<java.lang.reflect.Method> methods)
MirrorMethods from the given stream of Java Methodsmethods - The stream to use as the underlying stream for the MethodStreampublic static MethodStream ofAllUnwrappedMethods(java.util.Collection<java.lang.reflect.Method> methods)
MirrorMethods from the given collection of Java Methodsmethods - The collection of methods to create the stream frompublic static <I> MethodStream ofAllUnwrappedMethods(Scanner<java.lang.reflect.Method,I> scanner, I input)
MirrorMethods from the given Method scanner and inputI - The type of the inputscanner - The scanner to useinput - The input for the scannerpublic static MethodStream ofAllUnwrappedMethods(java.lang.reflect.Method... methods)
MirrorMethods from the given array of Java Methodsmethods - The array of methods to create the stream frompublic static <T> MirrorConstructor<T> of(java.lang.reflect.Constructor<T> constructor)
T - The type of the constructorconstructor - The constructor