类 ParserConditionExp
java.lang.Object
com.sh.wf.module.parser.ParserConditionExp
Description:
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- 2018年3月13日
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanparseCondition(ModuleContext context, ParserThisExp_I parserThisExp, String source) 解析#if的表达式static StringparseElseArea(String source) 解析#else区域parseElsifArea(String source) 解析#elsif条件表达式static StringparseExpress(ModuleContext context, ParserThisExp_I parserThisExp, String source) 解析条件表达式static String[]parseIFArea(String source) 解析出IF区域static Stringparser3MeshExpress(ModuleContext context, ParserThisExp_I parserThisExp, String source) 解析三目运算符 a==b?static StringparseSignleCondition(ModuleContext context, ParserThisExp_I parserThisExp, String source) 解析单个#if() #elsif() #else #end语法
-
构造器详细资料
-
ParserConditionExp
public ParserConditionExp()
-
-
方法详细资料
-
parseExpress
public static String parseExpress(ModuleContext context, ParserThisExp_I parserThisExp, String source) throws ParserException 解析条件表达式- 参数:
context- ModuleContextparserThisExp- ParserThisExp_Isource- String- 返回:
- #if #elsif #else #end
- 抛出:
ParserException- ParserException 注意:这里只会分离出条件表达式,并不会对表达式中的值进行表达式解析
-
parseSignleCondition
public static String parseSignleCondition(ModuleContext context, ParserThisExp_I parserThisExp, String source) throws ParserException 解析单个#if() #elsif() #else #end语法- 参数:
context- ModuleContextparserThisExp- ParserThisExp_Isource- String- 返回:
- String
- 抛出:
ParserException- ParserException
-
parseIFArea
解析出IF区域- 参数:
source- #if() #elsif() #else #end表达式- 返回:
- {条件表达式|区域值}
- 抛出:
ParserException- ParserException
-
parseElsifArea
解析#elsif条件表达式- 参数:
source- String- 返回:
- List
- 抛出:
ParserException- ParserException
-
parseElseArea
解析#else区域- 参数:
source- String- 返回:
- String
- 抛出:
ParserException- ParserException
-
parseCondition
public static boolean parseCondition(ModuleContext context, ParserThisExp_I parserThisExp, String source) throws ParserException 解析#if的表达式- 参数:
context- ModuleContextparserThisExp- ParserThisExp_Isource- 表达式 a==b && c==d- 返回:
- true|false
- 抛出:
ParserException- ParserException
-
parser3MeshExpress
public static String parser3MeshExpress(ModuleContext context, ParserThisExp_I parserThisExp, String source) 解析三目运算符 a==b?a:1- 参数:
context- ModuleContextparserThisExp- ParserThisExp_Isource- String- 返回:
- 如果不是三目运算符表达式,则返回null
-