javarule.stg

来自「jboss规则引擎」· STG 代码 · 共 25 行

STG
25
字号
group javaMethods;

returnValueMethod(declarations, declarationTypes, globals, globalTypes, methodName, text) ::= <<
public static Object <methodName>(<declarationTypes, declarations:{ type, declr | <type> <declr.identifier>}; separator=","><if(globals)><if(declarations)>,<endif><endif> <globalTypes, globals:{ type, identifier | <type> <identifier>}; separator=","> ) throws Exception {
    return ( <text> );
}
>>

predicateMethod(declaration, declarationType, declarations, declarationTypes, globals, globalTypes, methodName, text) ::= <<
public static boolean <methodName>(<declarationType> <declaration.identifier><if(declarations)>,<endif> <declarationTypes, declarations:{ type, declr | <type> <declr.identifier>}; separator=","><if(globals)>,<endif> <globalTypes, globals:{ type, identifier | <type> <identifier>}; separator=","> ) throws Exception {
    return ( <text> );
}
>>

evalMethod(declarations, declarationTypes, globals, globalTypes, methodName, text) ::= <<
public static boolean <methodName>(<declarationTypes, declarations:{ type, declr | <type> <declr.identifier>}; separator=","><if(globals)><if(declarations)>,<endif><endif> <globalTypes, globals:{ type, identifier | <type> <identifier>}; separator=","> ) throws Exception {
    return ( <text> );
}
>>

consequenceMethod(declarations, declarationTypes, globals, globalTypes, methodName, text) ::= <<
public static void <methodName>(org.drools.spi.KnowledgeHelper drools<if(declarations)>,<endif> <declarationTypes, declarations:{ type, declr | <type> <declr.identifier>, org.drools.FactHandle <declr.identifier>__Handle__}; separator=","><if(globals)>,<endif> <globalTypes, globals:{ type, identifier | <type> <identifier>}; separator=","> ) throws Exception {
    <text>
}
>>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?