|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.reflect.ReflectUtil
public final class ReflectUtil
| Field Summary | |
|---|---|
static ClassLoader |
BOOT_CLASS_LOADER
A ClassLoader for the bootstrap classes -- those provided by the bootstrap class path in Sun JVMs. |
static Iterable<File> |
SYSTEM_CLASS_PATH
The value of system property "java.class.path", parsed as a list of files. |
| Method Summary | ||
|---|---|---|
static Class<?> |
arrayBaseClass(Class<?> c)
Gets the base component type of an array of arbitrary dimensions. |
|
static int |
arrayDimensions(Class<?> c)
Return the number of array dimensions represented by the given class. |
|
static
|
box(Class<T> c)
If c is a primitive type, return its boxed counterpart; otherwise, return c. |
|
static
|
cast(Class<? extends T> c,
Object o)
An implementation of Class.cast(java.lang.Object), which is unavailable prior to Java 5.0. |
|
static
|
constructorAsLambda(Class<? extends R> c,
Class<? super T> argT)
Wrap a constructor in a lambda. |
|
static
|
constructorAsLambda2(Class<? extends R> c,
Class<? super T1> arg1T,
Class<? super T2> arg2T)
Wrap a constructor in a lambda. |
|
static
|
constructorAsLambda3(Class<? extends R> c,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T)
Wrap a constructor in a lambda. |
|
static
|
constructorAsLambda4(Class<? extends R> c,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? super T4> arg4T)
Wrap a constructor in a lambda. |
|
static
|
constructorAsThunk(Class<? extends R> c)
Wrap a constructor in a thunk. |
|
static
|
fieldAsBox(Object object,
String fieldName,
Class<T> fieldType)
Wrap a field of the given object in a box. |
|
static
|
getClass(T obj)
Produce a correctly-typed class corresponding to obj. |
|
static Object |
getStaticField(ClassLoader loader,
String className,
String fieldName)
|
|
static Object |
getStaticField(String className,
String fieldName)
|
|
static Object |
invokeStaticMethod(ClassLoader loader,
String className,
String methodName,
Class<?>[] signature,
Object... args)
|
|
static Object |
invokeStaticMethod(ClassLoader loader,
String className,
String methodName,
Object... args)
|
|
static Object |
invokeStaticMethod(String className,
String methodName,
Class<?>[] signature,
Object... args)
|
|
static Object |
invokeStaticMethod(String className,
String methodName,
Object... args)
|
|
static boolean |
isAnonymousClass(Class<?> c)
An implementation of Class.isAnonymousClass(), which is unavailable prior to Java 5.0 |
|
static Object |
loadLibraryAdapter(ClassLoader baseLoader,
Iterable<? extends File> libraryPath,
String adapterName,
Class<?>[] constructorSig,
Object... constructorArgs)
Create an adapter object which provides an interface to a library that is not available statically on the class path (or, more generally, to the baseLoader). |
|
static Object |
loadLibraryAdapter(ClassLoader baseLoader,
Iterable<? extends File> libraryPath,
String adapterName,
Object... constructorArgs)
Create an adapter object which provides an interface to a library that is not available statically on the class path (or, more generally, to the baseLoader). |
|
static Object |
loadLibraryAdapter(Iterable<? extends File> libraryPath,
String adapterName,
Class<?>[] constructorSig,
Object... constructorArgs)
Create an adapter object which provides an interface to a library that is not available statically on the class path (or, more generally, to the baseLoader). |
|
static Object |
loadLibraryAdapter(Iterable<? extends File> libraryPath,
String adapterName,
Object... constructorArgs)
Create an adapter object which provides an interface to a library that is not available statically on the class path (or, more generally, to the baseLoader). |
|
static Object |
loadObject(ClassLoader loader,
String className,
Class<?>[] constructorSig,
Object... constructorArgs)
Create an instance of the given class. |
|
static Object |
loadObject(ClassLoader loader,
String className,
Object... constructorArgs)
Create an instance of the given class. |
|
static Object |
loadObject(String className,
Class<?>[] constructorSig,
Object... constructorArgs)
Create an instance of the given class. |
|
static Object |
loadObject(String className,
Object... constructorArgs)
Create an instance of the given class. |
|
static ComposedClassLoader |
mergeLoaders(ClassLoader first,
ClassLoader second)
Combine two class loaders by first matching classes in first, then delegating to second. |
|
static ComposedClassLoader |
mergeLoaders(ClassLoader first,
ClassLoader second,
boolean blackList,
String... firstPrefixes)
Combine two class loaders by matching a subset of those in first, followed by a search in second. |
|
static ComposedClassLoader |
mergeLoaders(ClassLoader first,
ClassLoader second,
String... firstIncludes)
Combine two class loaders by matching specific classes (or class prefixes) from first, and delegating
all other searches to second. |
|
static
|
methodAsLambda(Class<? super O> c,
String methodName,
Class<? extends R> retT)
Wrap a method in a lambda, with the receiver object as the first argument. |
|
static
|
methodAsLambda(Object object,
String methodName,
Class<? super T> argT,
Class<? extends R> retT)
Wrap a method of the given object in a lambda. |
|
static
|
methodAsLambda2(Class<? super O> c,
String methodName,
Class<? super T> argT,
Class<? extends R> retT)
Wrap a method in a lambda, with the receiver object as the first argument. |
|
static
|
methodAsLambda2(Object object,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? extends R> retT)
Wrap a method of the given object in a lambda. |
|
static
|
methodAsLambda3(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? extends R> retT)
Wrap a method in a lambda, with the receiver object as the first argument. |
|
static
|
methodAsLambda3(Object object,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? extends R> retT)
Wrap a method of the given object in a lambda. |
|
static
|
methodAsLambda4(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? extends R> retT)
Wrap a method in a lambda, with the receiver object as the first argument. |
|
static
|
methodAsThunk(Object object,
String methodName,
Class<? extends R> retT)
Wrap a method of the given object in a thunk. |
|
static String |
simpleName(Class<?> c)
Produce the simple name of the given class, as specified by Class.getSimpleName(),
with an improved scheme for anonymous classes. |
|
static
|
staticFieldAsBox(Class<?> c,
String fieldName,
Class<T> fieldType)
Wrap a static field in a box. |
|
static
|
staticMethodAsLambda(Class<? super O> c,
String methodName,
Class<? super T> argT,
Class<? extends R> retT)
Wrap a static method in a lambda. |
|
static
|
staticMethodAsLambda2(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? extends R> retT)
Wrap a static method in a lambda. |
|
static
|
staticMethodAsLambda3(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? extends R> retT)
Wrap a static method in a lambda. |
|
static
|
staticMethodAsThunk(Class<? super O> c,
String methodName,
Class<? extends R> retT)
Wrap a static method in a thunk. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ClassLoader BOOT_CLASS_LOADER
c ("java.lang.Number" or "javax.swing.JFrame",
for example), BOOT_CLASS_LOADER.loadClass(c).getClassLoader() has value
null. When constructing a class loader, there is no need to use this object as a parent --
simply use null as the parent parameter.
public static final Iterable<File> SYSTEM_CLASS_PATH
| Method Detail |
|---|
public static String simpleName(Class<?> c)
Class.getSimpleName(),
with an improved scheme for anonymous classes. The simple name of a class is generally
the unqualified name used to declare it. Arrays evaluate to the simple name of their
element type, followed by a pair of brackets. Anonymous classes, rather than evaluating to an
empty string, produce something like "anonymous Foo" (where Foo is the supertype). Assumes
non-anonymous classes follow a naming convention in which the simple name is the suffix
of the full class name following all '.' and '$' characters, and immediately following a
(possibly empty) sequence of digits.
public static boolean isAnonymousClass(Class<?> c)
Class.isAnonymousClass(), which is unavailable prior to Java 5.0
public static Class<?> arrayBaseClass(Class<?> c)
String,
String[], and String[][], this is String.
public static int arrayDimensions(Class<?> c)
String[][], this is 2.
For String, this is 0.
public static <T> T cast(Class<? extends T> c,
Object o)
throws ClassCastException
An implementation of Class.cast(java.lang.Object), which is unavailable prior to Java 5.0. Unlike the
Java API method, this version allows a boxed value to be cast to its unboxed equivalent — for
example, ReflectUtil.cast(int.class, 23) will succeed (see SDN bug 6456930).
The method is only capable of checking that o is an instance of the class c — not
that o is an instance of type T (for example, casting with a Class<List<Integer>> would
only check that o is a List<?>, but the return type would by List<Integer>).
Such discrepancies are rare in practice, because class literals (Foo.class) will only produce classes
for which T is unparameterized or raw.
Following Class.cast(), a boxed type cannot be cast to its unboxed equivalent, despite the fact
that such a cast would be safe. (From a practical point of view, we would prefer to avoid incurring the
overhead of box(java.lang.Class on every cast.)
ClassCastException - If the object cannot be cast to the given type.public static <T> Class<? extends T> getClass(T obj)
obj. obj.getClass(), in contrast,
returns a Class<?>.
public static <T> Class<T> box(Class<T> c)
c is a primitive type, return its boxed counterpart; otherwise, return c.
public static Object loadObject(String className,
Object... constructorArgs)
throws ReflectException
Create an instance of the given class. This is a convenience method that uses the class loader of
ReflectUtil to load className, and that infers the constructor signature from the
given arguments.
Note that the inference process for the constructor signature is potentially error-prone, because it
uses the concrete runtime types of the objects, which may be more specific than what is needed. It is
impossible, for example, to use this method to invoke a constructor whose parameters include
interface, abstract class, or primitive types. In such cases,
loadObject(String, Class[], Object[]) should be used instead.
A typical use of this method is to instantiate an object that belongs to or directly refers to
a library that is not guaranteed to be statically available at runtime. Since no direct reference
can by made to that object's class or any of the library's classes in the main body of code
(otherwise, a NoClassDefFoundError may occur), reflection must be used to load
the object.
ReflectException - As specified by loadObject(ClassLoader, String, Class[], Object[])loadObject(String, Class[], Object[]),
loadObject(ClassLoader, String, Class[], Object[])
public static Object loadObject(String className,
Class<?>[] constructorSig,
Object... constructorArgs)
throws ReflectException
Create an instance of the given class. This is a convenience method that uses the class loader of
ReflectUtil to load className.
A typical use of this method is to instantiate an object that belongs to or directly refers to
a library that is not guaranteed to be statically available at runtime. Since no direct reference
can by made to that object's class or any of the library's classes in the main body of code
(otherwise, a NoClassDefFoundError may occur), reflection must be used to load
the object.
ReflectException - As specified by loadObject(ClassLoader, String, Class[], Object[])loadObject(String, Object[]),
loadObject(ClassLoader, String, Class[], Object[])
public static Object loadObject(ClassLoader loader,
String className,
Object... constructorArgs)
throws ReflectException
Create an instance of the given class. This is a convenience method that infers the constructor signature from the given arguments.
Note that the inference process for the constructor signature is potentially error-prone, because it
uses the concrete runtime types of the objects, which may be more specific than what is needed. It is
impossible, for example, to use this method to invoke a constructor whose parameters include
interface, abstract class, or primitive types. In such cases,
loadObject(ClassLoader, String, Class[], Object[]) should be used instead.
A typical use of this method is to instantiate an object that belongs to or directly refers to
a library that is not guaranteed to be statically available at runtime. Since no direct reference
can by made to that object's class or any of the library's classes in the main body of code
(otherwise, a NoClassDefFoundError may occur), reflection must be used to load
the object.
ReflectException - As specified by loadObject(ClassLoader, String, Class[], Object[])loadObject(String, Object[]),
loadObject(ClassLoader, String, Class[], Object[])
public static Object loadObject(ClassLoader loader,
String className,
Class<?>[] constructorSig,
Object... constructorArgs)
throws ReflectException
Create an instance of the given class. This method invokes
Class.forName(String, boolean, ClassLoader) (with initialize set to true),
Class.getConstructor(Class[]), and Constructor.newInstance(java.lang.Object...).
A typical use of this method is to instantiate an object that belongs to or directly refers to
a library that is not guaranteed to be statically available at runtime. Since no direct reference
can by made to that object's class or any of the library's classes in the main body of code
(otherwise, a NoClassDefFoundError may occur), reflection must be used to load
the object.
loader - A class loader used to load the specified classclassName - The name of the class to be instantiatedconstructorSig - The types of the desired constructor's parameters; these must exactly match the
the constructor's declared signature (may not be null)constructorArgs - The arguments to pass to the constructor (null is also acceptable where
there are no parameters)
ReflectException - This operation may trigger any of the following, which is wrapped as a
ReflectException:ClassNotFoundException if className cannot be foundNoSuchMethodException if no constructor with the given signature
existsIllegalArgumentException if the cardinality and types of
constructorArgs are inconsistent with constructorSigInvocationTargetException in any throwable is thrown by the
constructorInstantiationException if the class is abstractIllegalAccessException if the constructor is inaccessibleSecurityException if the security manager denies access to the
constructorloadObject(String, Object[]),
loadObject(String, Class[], Object[])
public static Object getStaticField(String className,
String fieldName)
throws ReflectException
ReflectException
public static Object getStaticField(ClassLoader loader,
String className,
String fieldName)
throws ReflectException
ReflectException
public static Object invokeStaticMethod(String className,
String methodName,
Object... args)
throws ReflectException
ReflectException
public static Object invokeStaticMethod(ClassLoader loader,
String className,
String methodName,
Object... args)
throws ReflectException
ReflectException
public static Object invokeStaticMethod(String className,
String methodName,
Class<?>[] signature,
Object... args)
throws ReflectException
ReflectException
public static Object invokeStaticMethod(ClassLoader loader,
String className,
String methodName,
Class<?>[] signature,
Object... args)
throws ReflectException
ReflectException
public static Object loadLibraryAdapter(Iterable<? extends File> libraryPath,
String adapterName,
Object... constructorArgs)
throws ReflectException
Create an adapter object which provides an interface to a library that is not available statically on the
class path (or, more generally, to the baseLoader). This assumes the relevant code may be organized
into three groups: the base classes, which are available to the baseLoader and make
no direct references to the library or adapter classes; the library classes, which are located in the path
represented by libraryPath, and make no direct references to the adapter class; and the adapter
class (including its inner classes), which is available to the baseLoader, and which can
directly refer to both the library and base classes.
This is a convenience method that uses the class loader of ReflectUtil as baseLoader, and
that infers the constructor signature from the given arguments. Note that the inference process for the
constructor signature is potentially error-prone, because it uses the concrete runtime types of the objects,
which may be more specific than what is needed. It is impossible, for example, to use this method to invoke a
constructor whose parameters include interface, abstract class, or primitive types. In such cases,
loadLibraryAdapter(Iterable, String, Class[], Object[]) should be used instead.
ReflectException - As specified by loadObject(ClassLoader, String, Class[], Object[])
public static Object loadLibraryAdapter(Iterable<? extends File> libraryPath,
String adapterName,
Class<?>[] constructorSig,
Object... constructorArgs)
throws ReflectException
Create an adapter object which provides an interface to a library that is not available statically on the
class path (or, more generally, to the baseLoader). This assumes the relevant code may be organized
into three groups: the base classes, which are available to the baseLoader and make
no direct references to the library or adapter classes; the library classes, which are located in the path
represented by libraryPath, and make no direct references to the adapter class; and the adapter
class (including its inner classes), which is available to the baseLoader, and which can
directly refer to both the library and base classes.
This is a convenience method that uses the class loader of ReflectUtil to load className.
ReflectException - As specified by loadObject(ClassLoader, String, Class[], Object[])
public static Object loadLibraryAdapter(ClassLoader baseLoader,
Iterable<? extends File> libraryPath,
String adapterName,
Object... constructorArgs)
throws ReflectException
Create an adapter object which provides an interface to a library that is not available statically on the
class path (or, more generally, to the baseLoader). This assumes the relevant code may be organized
into three groups: the base classes, which are available to the baseLoader and make
no direct references to the library or adapter classes; the library classes, which are located in the path
represented by libraryPath, and make no direct references to the adapter class; and the adapter
class (including its inner classes), which is available to the baseLoader, and which can
directly refer to both the library and base classes.
This is a convenience method that infers the constructor signature from the given arguments. Note that the
inference process for the constructor signature is potentially error-prone, because it uses the concrete runtime
types of the objects, which may be more specific than what is needed. It is impossible, for example, to use this
method to invoke a constructor whose parameters include interface, abstract class, or primitive types. In such
cases, loadLibraryAdapter(ClassLoader, Iterable, String, Class[], Object[]) should be used instead.
ReflectException - As specified by loadObject(ClassLoader, String, Class[], Object[])
public static Object loadLibraryAdapter(ClassLoader baseLoader,
Iterable<? extends File> libraryPath,
String adapterName,
Class<?>[] constructorSig,
Object... constructorArgs)
throws ReflectException
Create an adapter object which provides an interface to a library that is not available statically on the
class path (or, more generally, to the baseLoader). This assumes the relevant code may be organized
into three groups: the base classes, which are available to the baseLoader and make
no direct references to the library or adapter classes; the library classes, which are located in the path
represented by libraryPath, and make no direct references to the adapter class; and the adapter
class (including its inner classes), which is available to the baseLoader, and which can
directly refer to both the library and base classes.
This method constructs an appropriate class loader and then invokes
loadObject(ClassLoader, String, Class[], Object[]).
ReflectException - As specified by loadObject(ClassLoader, String, Class[], Object[])
public static ComposedClassLoader mergeLoaders(ClassLoader first,
ClassLoader second)
first, then delegating to second.
public static ComposedClassLoader mergeLoaders(ClassLoader first,
ClassLoader second,
String... firstIncludes)
first, and delegating
all other searches to second. Bootstrap classes will not be filtered from first.
public static ComposedClassLoader mergeLoaders(ClassLoader first,
ClassLoader second,
boolean blackList,
String... firstPrefixes)
first, followed by a search in second.
The nature of the subset is defined by parameters blackList and firstPrefixes. Bootstrap classes
will not be filtered from first.
blackList - Whether classes matching firstPrefixes should be shadowed in first; otherwise,
all classes except those that match will be shadowed.firstPrefixes - Class or package prefix to match in determining which classes or first are shadowed
public static <T> Box<T> staticFieldAsBox(Class<?> c,
String fieldName,
Class<T> fieldType)
ReflectExceptions nested in WrappedExceptions by the box's value() and
set() methods. If the field is known statically, and performance is important, consider defining a
custom box instead.
public static <T> Box<T> fieldAsBox(Object object,
String fieldName,
Class<T> fieldType)
ReflectExceptions nested in WrappedExceptions by the box's value() and
set() methods. If the field is known statically, and performance is important, consider defining a
custom box instead.
public static <O,R> Thunk<R> staticMethodAsThunk(Class<? super O> c,
String methodName,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the thunk's value() method.
If the method is known statically, and performance is important, consider defining a custom thunk instead.
public static <R> Thunk<R> methodAsThunk(Object object,
String methodName,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the thunk's
value() method. If the method is known statically, and performance is important, consider defining
a custom thunk instead.
public static <O,R> Lambda<O,R> methodAsLambda(Class<? super O> c,
String methodName,
Class<? extends R> retT)
ReflectExceptions nested in
WrappedExceptions by the lambda's value() method. If the method is known statically, and
performance is important, consider defining a custom lambda instead.
public static <O,T,R> Lambda<T,R> staticMethodAsLambda(Class<? super O> c,
String methodName,
Class<? super T> argT,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the lambda's value() method.
If the method is known statically, and performance is important, consider defining a custom lambda instead.
public static <T,R> Lambda<T,R> methodAsLambda(Object object,
String methodName,
Class<? super T> argT,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the lambda's
value() method. If the method is known statically, and performance is important, consider defining
a custom lambda instead.
public static <O,T,R> Lambda2<O,T,R> methodAsLambda2(Class<? super O> c,
String methodName,
Class<? super T> argT,
Class<? extends R> retT)
ReflectExceptions nested in
WrappedExceptions by the lambda's value() method. If the method is known statically, and
performance is important, consider defining a custom lambda instead.
public static <O,T1,T2,R> Lambda2<T1,T2,R> staticMethodAsLambda2(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the lambda's value() method.
If the method is known statically, and performance is important, consider defining a custom lambda instead.
public static <T1,T2,R> Lambda2<T1,T2,R> methodAsLambda2(Object object,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the lambda's
value() method. If the method is known statically, and performance is important, consider defining
a custom lambda instead.
public static <O,T1,T2,R> Lambda3<O,T1,T2,R> methodAsLambda3(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? extends R> retT)
ReflectExceptions nested in
WrappedExceptions by the lambda's value() method. If the method is known statically, and
performance is important, consider defining a custom lambda instead.
public static <O,T1,T2,T3,R> Lambda3<T1,T2,T3,R> staticMethodAsLambda3(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the lambda's value() method.
If the method is known statically, and performance is important, consider defining a custom lambda instead.
public static <T1,T2,T3,R> Lambda3<T1,T2,T3,R> methodAsLambda3(Object object,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? extends R> retT)
ReflectExceptions nested in WrappedExceptions by the lambda's
value() method. If the method is known statically, and performance is important, consider defining
a custom lambda instead.
public static <O,T1,T2,T3,R> Lambda4<O,T1,T2,T3,R> methodAsLambda4(Class<? super O> c,
String methodName,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? extends R> retT)
ReflectExceptions nested in
WrappedExceptions by the lambda's value() method. If the method is known statically, and
performance is important, consider defining a custom lambda instead.
public static <R> Thunk<R> constructorAsThunk(Class<? extends R> c)
ReflectExceptions nested in WrappedExceptions by the thunk's value()
method. If the constructor is known statically, and performance is important, consider defining a custom
thunk instead.
public static <T,R> Lambda<T,R> constructorAsLambda(Class<? extends R> c,
Class<? super T> argT)
ReflectExceptions nested in WrappedExceptions by the lambda's value()
method. If the constructor is known statically, and performance is important, consider defining a custom
lambda instead.
public static <T1,T2,R> Lambda2<T1,T2,R> constructorAsLambda2(Class<? extends R> c,
Class<? super T1> arg1T,
Class<? super T2> arg2T)
ReflectExceptions nested in WrappedExceptions by the lambda's value()
method. If the constructor is known statically, and performance is important, consider defining a custom
lambda instead.
public static <T1,T2,T3,R> Lambda3<T1,T2,T3,R> constructorAsLambda3(Class<? extends R> c,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T)
ReflectExceptions nested in WrappedExceptions by the lambda's value()
method. If the constructor is known statically, and performance is important, consider defining a custom
lambda instead.
public static <T1,T2,T3,T4,R> Lambda4<T1,T2,T3,T4,R> constructorAsLambda4(Class<? extends R> c,
Class<? super T1> arg1T,
Class<? super T2> arg2T,
Class<? super T3> arg3T,
Class<? super T4> arg4T)
ReflectExceptions nested in WrappedExceptions by the lambda's value()
method. If the constructor is known statically, and performance is important, consider defining a custom
lambda instead.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||