类 ExecutableUtils
- java.lang.Object
-
- io.microsphere.util.BaseUtils
-
- io.microsphere.reflect.ExecutableUtils
-
-
构造器概要
构造器 构造器 说明 ExecutableUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <E extends java.lang.reflect.Executable & java.lang.reflect.Member>
voidexecute(E object, ThrowableConsumer<E> callback)
Execute anExecutable
instancestatic <E extends java.lang.reflect.Executable & java.lang.reflect.Member,R>
Rexecute(E executableMember, ThrowableFunction<E,R> callback)
Execute anExecutable
instancestatic <E extends java.lang.reflect.Executable & java.lang.reflect.Member,R>
Rexecute(E executable, ThrowableSupplier<R> supplier)
Executes theExecutable
-
-
-
方法详细资料
-
execute
public static <E extends java.lang.reflect.Executable & java.lang.reflect.Member> void execute(E object, ThrowableConsumer<E> callback) throws java.lang.NullPointerException, java.lang.IllegalStateException, java.lang.IllegalArgumentException, java.lang.RuntimeException
Execute anExecutable
instance- 类型参数:
E
- The type or subtype ofExecutable
- 参数:
object
-Executable
instance,Field
,Method
orConstructor
callback
- the call back to executeExecutable
object- 抛出:
java.lang.NullPointerException
- IfexecutableMember
isnull
java.lang.IllegalStateException
- if thisexecutableMember
object is enforcing Java language access control and the underlying executable member is inaccessible.java.lang.IllegalArgumentException
- if the executable member is an instance executable member and the specified object argument is not an instance of the class or interface declaring the underlying executable member (or of a subclass or implementor thereof); if the number of actual and formal parameters differ; if an unwrapping conversion for primitive arguments fails; or if, after possible unwrapping, a parameter value cannot be converted to the corresponding formal parameter type by a executable member invocation conversion.java.lang.RuntimeException
- if the underlying executable member throws an exception.
-
execute
public static <E extends java.lang.reflect.Executable & java.lang.reflect.Member,R> R execute(E executable, ThrowableSupplier<R> supplier) throws java.lang.NullPointerException, java.lang.IllegalStateException, java.lang.IllegalArgumentException, java.lang.RuntimeException
Executes theExecutable
- 参数:
executable
-Executable
supplier
-ThrowableConsumer
- 抛出:
java.lang.NullPointerException
- IfexecutableMember
isnull
java.lang.IllegalStateException
- if thisexecutableMember
object is enforcing Java language access control and the underlying executable member is inaccessible.java.lang.IllegalArgumentException
- if the executable member is an instance executable member and the specified object argument is not an instance of the class or interface declaring the underlying executable member (or of a subclass or implementor thereof); if the number of actual and formal parameters differ; if an unwrapping conversion for primitive arguments fails; or if, after possible unwrapping, a parameter value cannot be converted to the corresponding formal parameter type by a executable member invocation conversion.java.lang.RuntimeException
- if the underlying executable member throws an exception.
-
execute
public static <E extends java.lang.reflect.Executable & java.lang.reflect.Member,R> R execute(E executableMember, ThrowableFunction<E,R> callback) throws java.lang.NullPointerException, java.lang.IllegalStateException, java.lang.IllegalArgumentException, java.lang.RuntimeException
Execute anExecutable
instance- 类型参数:
E
- The type or subtype ofExecutable
R
- The type of execution result- 参数:
executableMember
-Executable
Member
,Method
orConstructor
callback
- the call back to executeExecutable
Member
- 返回:
- The execution result
- 抛出:
java.lang.NullPointerException
- IfexecutableMember
isnull
java.lang.IllegalStateException
- if thisexecutableMember
object is enforcing Java language access control and the underlying executable member is inaccessible.java.lang.IllegalArgumentException
- if the executable member is an instance executable member and the specified object argument is not an instance of the class or interface declaring the underlying executable member (or of a subclass or implementor thereof); if the number of actual and formal parameters differ; if an unwrapping conversion for primitive arguments fails; or if, after possible unwrapping, a parameter value cannot be converted to the corresponding formal parameter type by a executable member invocation conversion.java.lang.RuntimeException
- if the underlying executable member throws an exception.
-
-