public class JavaMethod extends java.lang.Object implements IJavaMethod
| Modifier and Type | Field and Description |
|---|---|
static int |
PRIORITY_HIGH |
static int |
PRIORITY_INVALID |
static int |
PRIORITY_LOW |
static int |
PRIORITY_MEDIUM |
boolean |
returnsSelf |
| Constructor and Description |
|---|
JavaMethod(java.lang.reflect.Method method,
ITypeRegistry types) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(IEnvironmentGlobal environment,
Expression... arguments) |
boolean |
accepts(int numArguments) |
static IJavaMethod |
get(ITypeRegistry types,
java.lang.Class cls,
java.lang.String name,
java.lang.Class... parameterTypes) |
static IJavaMethod |
get(ITypeRegistry types,
java.lang.reflect.Method method) |
java.lang.String |
getErrorDescription() |
java.lang.reflect.Method |
getMethod() |
java.lang.Class |
getOwner() |
ZenType[] |
getParameterTypes() |
int |
getPriority(IEnvironmentGlobal environment,
Expression... arguments) |
ZenType |
getReturnType() |
static IJavaMethod |
getStatic(java.lang.String owner,
java.lang.String name,
ZenType returnType,
ZenType... arguments) |
void |
invokeStatic(MethodOutput output) |
void |
invokeVirtual(MethodOutput output) |
boolean |
isStatic() |
boolean |
isVarargs() |
static ZenType[] |
predict(java.util.List<IJavaMethod> methods,
int numArguments) |
static Expression[] |
rematch(ZenPosition position,
IJavaMethod method,
IEnvironmentGlobal environment,
Expression... arguments) |
static IJavaMethod |
select(boolean doStatic,
java.util.List<IJavaMethod> methods,
IEnvironmentGlobal environment,
Expression... arguments) |
java.lang.String |
toString() |
public static final int PRIORITY_INVALID
public static final int PRIORITY_LOW
public static final int PRIORITY_MEDIUM
public static final int PRIORITY_HIGH
public final boolean returnsSelf
public JavaMethod(java.lang.reflect.Method method,
ITypeRegistry types)
public static IJavaMethod get(ITypeRegistry types, java.lang.Class cls, java.lang.String name, java.lang.Class... parameterTypes)
public static IJavaMethod getStatic(java.lang.String owner, java.lang.String name, ZenType returnType, ZenType... arguments)
public static IJavaMethod get(ITypeRegistry types, java.lang.reflect.Method method)
public static IJavaMethod select(boolean doStatic, java.util.List<IJavaMethod> methods, IEnvironmentGlobal environment, Expression... arguments)
public static ZenType[] predict(java.util.List<IJavaMethod> methods, int numArguments)
public static Expression[] rematch(ZenPosition position, IJavaMethod method, IEnvironmentGlobal environment, Expression... arguments)
public boolean isStatic()
isStatic in interface IJavaMethodpublic boolean isVarargs()
isVarargs in interface IJavaMethodpublic ZenType getReturnType()
getReturnType in interface IJavaMethodpublic ZenType[] getParameterTypes()
getParameterTypes in interface IJavaMethodpublic java.lang.Class getOwner()
public java.lang.reflect.Method getMethod()
public boolean accepts(IEnvironmentGlobal environment, Expression... arguments)
accepts in interface IJavaMethodpublic boolean accepts(int numArguments)
accepts in interface IJavaMethodpublic int getPriority(IEnvironmentGlobal environment, Expression... arguments)
getPriority in interface IJavaMethodpublic void invokeVirtual(MethodOutput output)
invokeVirtual in interface IJavaMethodpublic void invokeStatic(MethodOutput output)
invokeStatic in interface IJavaMethodpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getErrorDescription()
getErrorDescription in interface IJavaMethod