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
MirrorClass es from the given collection of mirror classes |
static ClassStream |
ofAll(MirrorClass<?>... classes)
Creates a stream of
MirrorClass es from the given array of mirror classes |
static ClassStream |
ofAll(java.util.stream.Stream<MirrorClass<?>> classes)
Creates a stream of
MirrorClass es from the given stream of mirror classes |
static FieldStream |
ofAllFields(java.util.Collection<MirrorField> fields)
Creates a stream of
MirrorField s from the given collection of mirror fields |
static FieldStream |
ofAllFields(MirrorField... fields)
Creates a stream of
MirrorField s from the given array of mirror fields |
static FieldStream |
ofAllFields(java.util.stream.Stream<MirrorField> fields)
Creates a stream of
MirrorField s from the given stream of mirror fields |
static ClassStream |
ofAllInJar(java.io.File jar)
Creates a stream of all the
MirrorClass es 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
MirrorClass es 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
MirrorClass es in the given package |
static MethodStream |
ofAllMethods(java.util.Collection<MirrorMethod> methods)
Creates a stream of
MirrorMethod s from the given collection of mirror methods |
static MethodStream |
ofAllMethods(MirrorMethod... methods)
Creates a stream of
MirrorMethod s from the given array of mirror methods |
static MethodStream |
ofAllMethods(java.util.stream.Stream<MirrorMethod> methods)
Creates a stream of
MirrorMethod s from the given stream of mirror methods |
static ClassStream |
ofAllUnwrapped(java.lang.Class<?>... classes)
Creates a stream of
MirrorClass es from the given array of Java Class es |
static ClassStream |
ofAllUnwrapped(java.util.Collection<java.lang.Class<?>> classes)
Creates a stream of
MirrorClass es from the given collection of Java Class es |
static <I> ClassStream |
ofAllUnwrapped(Scanner<java.lang.Class<?>,I> scanner,
I input)
Creates a stream of
MirrorClass es from the given Class scanner and scanner input |
static ClassStream |
ofAllUnwrapped(java.util.stream.Stream<java.lang.Class<?>> classes)
Creates a stream of
MirrorClass es from the given stream of Java Class es |
static FieldStream |
ofAllUnwrappedFields(java.util.Collection<java.lang.reflect.Field> fields)
Creates a stream of
MirrorField s from the given collection of Java Field s |
static FieldStream |
ofAllUnwrappedFields(java.lang.reflect.Field... fields)
Creates a stream of
MirrorField s from the given array of Java Field s |
static <I> FieldStream |
ofAllUnwrappedFields(Scanner<java.lang.reflect.Field,I> scanner,
I input)
Creates a stream of
MirrorField s from the given Field scanner and input |
static FieldStream |
ofAllUnwrappedFields(java.util.stream.Stream<java.lang.reflect.Field> fields)
Creates a stream of
MirrorField s from the given stream of Java Field s |
static MethodStream |
ofAllUnwrappedMethods(java.util.Collection<java.lang.reflect.Method> methods)
Creates a stream of
MirrorMethod s from the given collection of Java Method s |
static MethodStream |
ofAllUnwrappedMethods(java.lang.reflect.Method... methods)
Creates a stream of
MirrorMethod s from the given array of Java Method s |
static <I> MethodStream |
ofAllUnwrappedMethods(Scanner<java.lang.reflect.Method,I> scanner,
I input)
Creates a stream of
MirrorMethod s from the given Method scanner and input |
static MethodStream |
ofAllUnwrappedMethods(java.util.stream.Stream<java.lang.reflect.Method> methods)
Creates a stream of
MirrorMethod s from the given stream of Java Method s |
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)
MirrorClass
es from the given stream of mirror classesclasses
- The stream to use as the underlying stream for the ClassStream
public static ClassStream ofAll(java.util.Collection<MirrorClass<?>> classes)
MirrorClass
es from the given collection of mirror classesclasses
- The collection of classes to create the stream forpublic static ClassStream ofAll(MirrorClass<?>... classes)
MirrorClass
es 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)
MirrorClass
es from the given stream of Java Class
esclasses
- The stream of classes to create the stream forpublic static ClassStream ofAllUnwrapped(java.util.Collection<java.lang.Class<?>> classes)
MirrorClass
es from the given collection of Java Class
esclasses
- The collection of classes to create the stream forpublic static <I> ClassStream ofAllUnwrapped(Scanner<java.lang.Class<?>,I> scanner, I input)
MirrorClass
es 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)
MirrorClass
es from the given array of Java Class
esclasses
- The array of classes to create the stream forpublic static ClassStream ofAllInPackage(java.lang.String thePackage)
MirrorClass
es in the given packagethePackage
- The package to search inpublic static ClassStream ofAllInJar(java.io.File jar, java.lang.ClassLoader classLoader)
MirrorClass
es 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)
MirrorClass
es 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)
MirrorField
s from the given stream of mirror fieldsfields
- The stream to use as the underlying stream for the FieldStream
public static FieldStream ofAllFields(java.util.Collection<MirrorField> fields)
MirrorField
s from the given collection of mirror fieldsfields
- The collection of fields to create the stream frompublic static FieldStream ofAllFields(MirrorField... fields)
MirrorField
s 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)
MirrorField
s from the given stream of Java Field
sfields
- The stream of fields to usepublic static FieldStream ofAllUnwrappedFields(java.util.Collection<java.lang.reflect.Field> fields)
MirrorField
s from the given collection of Java Field
sfields
- The collection of fields to create the stream frompublic static <I> FieldStream ofAllUnwrappedFields(Scanner<java.lang.reflect.Field,I> scanner, I input)
MirrorField
s 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)
MirrorField
s from the given array of Java Field
sfields
- The array of fields to create the stream frompublic static MirrorMethod of(java.lang.reflect.Method m)
MirrorMethod
from the given Java Method
m
- The methodpublic static MethodStream ofAllMethods(java.util.stream.Stream<MirrorMethod> methods)
MirrorMethod
s from the given stream of mirror methodsmethods
- The stream to use as the underlying stream for the MethodStream
public static MethodStream ofAllMethods(java.util.Collection<MirrorMethod> methods)
MirrorMethod
s from the given collection of mirror methodsmethods
- The collection of methods to create the stream frompublic static MethodStream ofAllMethods(MirrorMethod... methods)
MirrorMethod
s 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)
MirrorMethod
s from the given stream of Java Method
smethods
- The stream to use as the underlying stream for the MethodStream
public static MethodStream ofAllUnwrappedMethods(java.util.Collection<java.lang.reflect.Method> methods)
MirrorMethod
s from the given collection of Java Method
smethods
- The collection of methods to create the stream frompublic static <I> MethodStream ofAllUnwrappedMethods(Scanner<java.lang.reflect.Method,I> scanner, I input)
MirrorMethod
s 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)
MirrorMethod
s from the given array of Java Method
smethods
- 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