orc.runtime.sites.java
Class InvokableHandle<M>
java.lang.Object
orc.runtime.sites.java.InvokableHandle<M>
- Direct Known Subclasses:
- ConstructorHandle, MethodHandle
public abstract class InvokableHandle<M>
- extends java.lang.Object
Share common functionality of MethodHandle
and
ConstructorHandle
.
- Author:
- quark
Field Summary |
java.lang.String |
name
|
Method Summary |
static InvokableHandle.Type |
classToType(java.lang.Class type)
|
static java.lang.Object |
coerce(java.lang.Class to,
java.lang.Object o)
Perform any necessary implicit coercion of an Orc object to a Java type. |
protected abstract int |
getModifiers(M m)
|
protected abstract java.lang.Class[] |
getParameterTypes(M m)
|
static boolean |
isCoercableFrom(java.lang.Class to,
java.lang.Object o)
Check whether an Orc object can be coerced to a Java class. |
M |
resolve(java.lang.Object[] arguments)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public java.lang.String name
InvokableHandle
public InvokableHandle(java.lang.String name,
M[] invokables)
classToType
public static InvokableHandle.Type classToType(java.lang.Class type)
coerce
public static java.lang.Object coerce(java.lang.Class to,
java.lang.Object o)
- Perform any necessary implicit coercion of an Orc object to a Java type.
isCoercableFrom
public static boolean isCoercableFrom(java.lang.Class to,
java.lang.Object o)
- Check whether an Orc object can be coerced to a Java class.
resolve
public M resolve(java.lang.Object[] arguments)
throws MethodTypeMismatchException,
InsufficientArgsException
- Throws:
MethodTypeMismatchException
InsufficientArgsException
getParameterTypes
protected abstract java.lang.Class[] getParameterTypes(M m)
getModifiers
protected abstract int getModifiers(M m)