|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.Methods
public class Methods
This is a facade class for method services.
Field Summary | |
---|---|
static MethodReflectionBinding |
methodReflectionBinding
|
static Interface |
NULL_INTERFACE
|
Constructor Summary | |
---|---|
Methods()
|
Method Summary | ||
---|---|---|
static MethodInterface |
adaptMethods(MethodInterface mi,
MethodTypeDefinition[] rangeMethods)
|
|
static
|
bindInterface(java.lang.Class<T> interfaze,
T obj)
Creates a InterfaceBinding implementation out of an object that implements an interface. |
|
static MethodInterface |
bindInterface(Interface interfaceType,
java.lang.Object obj)
Bind an interface type to an instance. |
|
static MethodInterface |
composeMethods(MethodInterface... interfaces)
|
|
static
|
createProxy(java.lang.Class<T> interfaze,
MethodInterface ib)
Creates a proxy implementation that implements all methods of the interface . |
|
static Interface |
getInterfaceType(java.lang.Class<?> interfaze)
|
|
static Interface |
getInterfaceTypeUnchecked(java.lang.Class<?> interfaze)
|
|
static MethodTypeDefinition |
getMethodDescription(java.lang.reflect.Method m)
Get method description |
|
static MethodType |
getMethodType(java.lang.reflect.Method m)
Get method description |
|
static MethodTypeBinding |
getMethodTypeBinding(java.lang.reflect.Method m)
Get method binding of a method. |
|
static MethodTypeBinding[] |
getMethodTypeBindings(java.lang.Class<?> interfaze)
Get method bindings for all methods of an interface |
|
static MethodTypeBinding[] |
getMethodTypeBindingsUnchecked(java.lang.Class<?> interfaze)
Get method type bindings of all methods of an interface |
|
static MethodInterface |
noMethods()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Interface NULL_INTERFACE
public static MethodReflectionBinding methodReflectionBinding
Constructor Detail |
---|
public Methods()
Method Detail |
---|
public static MethodInterface adaptMethods(MethodInterface mi, MethodTypeDefinition[] rangeMethods)
public static MethodInterface bindInterface(Interface interfaceType, java.lang.Object obj) throws BindingConstructionException
obj
must have all the
methods described in the interface type.
interfaceType
- interface typeobj
- instance
BindingConstructionException
public static <T> MethodInterface bindInterface(java.lang.Class<T> interfaze, T obj) throws BindingConstructionException
There are restrictions to interface methods. Methods cannot have as
argument, return type or as an exception anything DataTypes.getDataType(Class)
cannot create data type out of. In other perspective, all classes must
be composed of simple array, record, union, and primitive types.
interfaze
- interface to inspect methods fromobj
- implementing object
BindingConstructionException
public static <T> T createProxy(java.lang.Class<T> interfaze, MethodInterface ib) throws BindingConstructionException
interface
. The interface binding ib
must implement
all the methods.
interfaze
- interfaceib
- interface binding
BindingConstructionException
- on construction errorpublic static MethodTypeDefinition getMethodDescription(java.lang.reflect.Method m) throws DataTypeConstructionException
m
-
DataTypeConstructionException
public static MethodType getMethodType(java.lang.reflect.Method m) throws DataTypeConstructionException
m
-
DataTypeConstructionException
public static MethodTypeBinding getMethodTypeBinding(java.lang.reflect.Method m) throws BindingConstructionException
m
-
BindingConstructionException
public static MethodTypeBinding[] getMethodTypeBindingsUnchecked(java.lang.Class<?> interfaze)
interfaze
-
public static MethodTypeBinding[] getMethodTypeBindings(java.lang.Class<?> interfaze) throws BindingConstructionException
interfaze
-
BindingConstructionException
public static Interface getInterfaceType(java.lang.Class<?> interfaze) throws BindingConstructionException
BindingConstructionException
public static Interface getInterfaceTypeUnchecked(java.lang.Class<?> interfaze)
public static MethodInterface composeMethods(MethodInterface... interfaces) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static MethodInterface noMethods()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |