| 限定符和类型 | 类和说明 |
|---|---|
static class |
Action.ThrowableRecord
异常记录。
|
| 限定符和类型 | 字段和说明 |
|---|---|
Class<?> |
actionClass
编译后并且装载了的类
|
boolean |
changed
动作的定义是否已经改变
|
String |
classFileName
编译后的类存放的目录
|
ClassLoader |
classLoader
Java类装载器,动态装载类
|
String |
className
编译后的类名
|
String |
code
代码
|
String |
fileName
保存Java代码的文件名
|
static String[] |
javaKeyWords
Java关键字列表,不能作为类和包的名称
|
long |
lastModified
最后一次修改时间,用来判断是否事物已经更新
|
Method |
method
如果是Java动作,则有方法
|
Action |
outerAction
外部动作,如果有引用
|
String |
packageName
类的包名
|
ThingEntry |
thingEntry
定义动作的事物
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkChanged()
检查动作是否已经变更。
|
static Throwable |
doContextMethod(List<ThingEntry> contexts,
ActionContext actionContext,
String methodName,
Throwable exception) |
static Throwable |
doThingContextMethod(List<Thing> contexts,
ActionContext actionContext,
String methodName,
Throwable exception)
执行上下文的成功或者失败的方法。
|
Object |
exec(ActionContext context,
Object... params) |
Object |
exec(Object... params) |
Class |
getActionClass(ActionContext actionContext)
返回动作的类,如果存在。
|
static long |
getClassCompileTime(String classFileName) |
ClassLoader |
getClassLoader() |
static String |
getClassName(String className)
返回正确的包名,因在X-Meta包名和类名没有约束,但java的包名和类名不能是关键字,所以修改,在关键字前加t。
|
String |
getCompileClassPath() |
Object |
getData(String key)
通过键值获取数据。
|
org.slf4j.Logger |
getLogger()
返回动作对应的日志。
|
Method |
getMethod() |
Thing |
getThing() |
static int |
getThrowableRecordCount() |
static List<Action.ThrowableRecord> |
getThrowables() |
static void |
initContext(Thing context,
ActionContext actionContext)
初始化上下文。
|
Object |
run() |
Object |
run(ActionContext context) |
Object |
run(ActionContext context,
Map<String,Object> parameters) |
Object |
run(ActionContext context,
Map<String,Object> parameters,
boolean isSubAction) |
Object |
run(ActionContext context,
Map<String,Object> parameters,
Object caller,
boolean isSubAction) |
Object |
runArrayParams(ActionContext context,
Object[] params_,
Object caller,
boolean isSubAction) |
Object |
runMapParams(ActionContext context,
Map<String,Object> parameters,
Object caller,
boolean isSubAction) |
void |
setData(String key,
Object data)
设置数据。
|
static void |
setThrowableRecordCount(int throwableRecordCount) |
void |
updateCompileTime() |
public static final String[] javaKeyWords
public ThingEntry thingEntry
public long lastModified
public ClassLoader classLoader
public String className
public String classFileName
public String packageName
public String fileName
public String code
public Class<?> actionClass
public boolean changed
public Action outerAction
public Method method
public Action(Thing thing)
thing - 定义动作的事物public void checkChanged()
public Class getActionClass(ActionContext actionContext)
actionContext - 变量上下文public void updateCompileTime()
public Method getMethod()
public Object run()
public Object run(ActionContext context)
public Object exec(ActionContext context, Object... params)
public Object run(ActionContext context, Map<String,Object> parameters)
public Object run(ActionContext context, Map<String,Object> parameters, boolean isSubAction)
public Object run(ActionContext context, Map<String,Object> parameters, Object caller, boolean isSubAction)
public Object runArrayParams(ActionContext context, Object[] params_, Object caller, boolean isSubAction)
public Object runMapParams(ActionContext context, Map<String,Object> parameters, Object caller, boolean isSubAction)
public static Throwable doContextMethod(List<ThingEntry> contexts, ActionContext actionContext, String methodName, Throwable exception)
public static Throwable doThingContextMethod(List<Thing> contexts, ActionContext actionContext, String methodName, Throwable exception)
contexts - 上下文列表actionContext - 变量上下文methodName - 方法名称exception - 抛出的异常public static void initContext(Thing context, ActionContext actionContext)
context - 上下文事物actionContext - 变量上下文public ClassLoader getClassLoader()
public String getCompileClassPath()
public org.slf4j.Logger getLogger()
public static String getClassName(String className)
className - 类名public Thing getThing()
public static long getClassCompileTime(String classFileName)
public static int getThrowableRecordCount()
public static void setThrowableRecordCount(int throwableRecordCount)
public static List<Action.ThrowableRecord> getThrowables()
Copyright © 2016 xworker.org. All rights reserved.