| 限定符和类型 | 类和说明 |
|---|---|
static class |
Action.ThrowableRecord
异常记录。
|
| 限定符和类型 | 字段和说明 |
|---|---|
static String[] |
javaKeyWords
Java关键字列表,不能作为类和包的名称
|
long |
lastModified
最后一次修改时间,用来判断是否事物已经更新
|
static byte |
SOURCE_LIB
源码类型-类库
|
static byte |
SOURCE_THING
源码类型-模型
|
static byte |
SOURCE_THINGMANAGER
源码类型-事物管理器
|
static String |
str_acContext |
static String |
str_action |
static String |
str_actionThing |
static String |
str_parentContext |
ThingEntry |
thingEntry
定义动作的事物
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
call(ActionContext actionContext,
Map<String,Object> parameters) |
<T> T |
call(ActionContext actionContext,
Object... params) |
void |
checkChanged()
检查动作是否已经变更。
|
static Throwable |
doThingContextMethod(List<Thing> contexts,
ActionContext actionContext,
String methodName,
Throwable exception,
Object result)
执行上下文的成功或者失败的方法。
|
<T> T |
exec(ActionContext actionContext,
Object... params) |
<T> T |
exec(Object... params) |
Class<?> |
getActionClass() |
Class |
getActionClass(ActionContext actionContext)
返回动作的类,如果存在。
|
String |
getClassFileName() |
ClassLoader |
getClassLoader() |
String |
getClassName() |
static String |
getClassName(String className)
返回正确的包名,因在X-Meta包名和类名没有约束,但java的包名和类名不能是关键字,所以修改,在关键字前加t。
|
String |
getClassTargetDirectory() |
String |
getCode() |
String |
getCompileClassPath() |
Object |
getData(String key)
通过键值获取数据。
|
String |
getFileName() |
long |
getLastModified() |
Method |
getMethod() |
String |
getOtherActionPath() |
Action |
getOuterAction() |
String |
getPackageName() |
Thing |
getThing() |
static int |
getThrowableRecordCount() |
static List<Action.ThrowableRecord> |
getThrowables() |
static void |
initContext(Action action,
Thing context,
ActionContext actionContext)
执行动作上下文的inherit或init方法。
|
boolean |
isChanged() |
boolean |
isJava() |
boolean |
isNeedRecompile()
返回是否需要重新编译。
|
<T> T |
run() |
<T> T |
run(ActionContext actionContext) |
<T> T |
run(ActionContext actionContext,
Map<String,Object> parameters) |
<T> T |
run(ActionContext actionContext,
Map<String,Object> parameters,
boolean isSubAction) |
<T> T |
run(ActionContext actionContext,
Map<String,Object> parameters,
Object caller,
boolean isSubAction) |
<T> T |
run(ActionContext actionContext,
Object... params) |
<T> T |
runArrayParams(ActionContext actionContext,
Object[] params_,
Object caller,
boolean isSubAction) |
<T> T |
runMapParams(ActionContext actionContext,
Map<String,Object> parameters,
Object caller,
boolean isSubAction) |
void |
setActionClass(Class<?> actionClass) |
void |
setChanged(boolean changed) |
void |
setData(String key,
Object data)
设置数据。
|
void |
setMethod(Method method) |
static void |
setThrowableRecordCount(int throwableRecordCount) |
static void |
updateClassCompileTime(String classFileName,
String className,
long time) |
void |
updateCompileTime() |
public static final String[] javaKeyWords
public static final byte SOURCE_LIB
public static final byte SOURCE_THINGMANAGER
public static final byte SOURCE_THING
public ThingEntry thingEntry
public long lastModified
public Action(Thing thing)
thing - 定义动作的事物public void checkChanged()
public String getClassTargetDirectory()
public ClassLoader getClassLoader() throws MalformedURLException
public Class getActionClass(ActionContext actionContext)
actionContext - 变量上下文public void updateCompileTime()
public Method getMethod()
public final <T> T run()
public final <T> T run(ActionContext actionContext)
public final <T> T run(ActionContext actionContext, Object... params)
public final <T> T exec(Object... params)
public final <T> T exec(ActionContext actionContext, Object... params)
public final <T> T call(ActionContext actionContext, Object... params)
public final <T> T call(ActionContext actionContext, Map<String,Object> parameters)
public final <T> T run(ActionContext actionContext, Map<String,Object> parameters)
public final <T> T run(ActionContext actionContext, Map<String,Object> parameters, boolean isSubAction)
public final <T> T run(ActionContext actionContext, Map<String,Object> parameters, Object caller, boolean isSubAction)
public final <T> T runArrayParams(ActionContext actionContext, Object[] params_, Object caller, boolean isSubAction)
public final <T> T runMapParams(ActionContext actionContext, Map<String,Object> parameters, Object caller, boolean isSubAction)
public static Throwable doThingContextMethod(List<Thing> contexts, ActionContext actionContext, String methodName, Throwable exception, Object result)
contexts - 上下文列表actionContext - 变量上下文methodName - 方法名称exception - 抛出的异常result - 运行结果public static void initContext(Action action, Thing context, ActionContext actionContext)
action - 动作context - 上下文事物actionContext - 变量上下文public String getCompileClassPath()
public static String getClassName(String className)
className - 类名public Thing getThing()
public boolean isNeedRecompile()
public static void updateClassCompileTime(String classFileName, String className, long time)
public static int getThrowableRecordCount()
public static void setThrowableRecordCount(int throwableRecordCount)
public static List<Action.ThrowableRecord> getThrowables()
public Class<?> getActionClass()
public void setActionClass(Class<?> actionClass)
public boolean isChanged()
public void setChanged(boolean changed)
public boolean isJava()
public long getLastModified()
public String getOtherActionPath()
public String getClassName()
public String getClassFileName()
public String getPackageName()
public String getFileName()
public String getCode()
public Action getOuterAction()
public void setMethod(Method method)
Copyright © 2022 xworker.org. All rights reserved.