public class FlowExpressionParseUtil extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | FlowExpressionParseUtil.FlowExpressionContextContext used to parse a flow expression. | 
| static class  | FlowExpressionParseUtil.FlowExpressionParseExceptionAn exception that indicates a parse error. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected static Pattern | ANCHORED_PARAMETER_PATTERNAnchored pattern for a formal parameter. | 
| protected static String | PARAMETER_REGEXRegular expression for a formal parameter use. | 
| protected static Pattern | UNANCHORED_PARAMETER_PATTERNUnanchored; can be used to find all formal parameter uses. | 
| Constructor and Description | 
|---|
| FlowExpressionParseUtil() | 
| Modifier and Type | Method and Description | 
|---|---|
| static FlowExpressions.Receiver | internalReprOfVariable(AnnotatedTypeFactory provider,
                      VariableTree tree) | 
| static List<Integer> | parameterIndices(String s)Returns a list of 1-based indices of all formal parameters that occur in  s. | 
| static FlowExpressions.Receiver | parse(String expression,
     FlowExpressionParseUtil.FlowExpressionContext context,
     TreePath localScope,
     boolean useLocalScope)Parse a string and return its representation as a  FlowExpressions.Receiver, or throw anFlowExpressionParseUtil.FlowExpressionParseException. | 
protected static final String PARAMETER_REGEX
protected static final Pattern ANCHORED_PARAMETER_PATTERN
protected static final Pattern UNANCHORED_PARAMETER_PATTERN
public static FlowExpressions.Receiver parse(String expression, FlowExpressionParseUtil.FlowExpressionContext context, TreePath localScope, boolean useLocalScope) throws FlowExpressionParseUtil.FlowExpressionParseException
FlowExpressions.Receiver, or throw an FlowExpressionParseUtil.FlowExpressionParseException.expression - flow expression to parsecontext - information about any receiver and argumentslocalScope - path to local scope to useuseLocalScope - whether localScope should be used to resolve identifiersFlowExpressionParseUtil.FlowExpressionParseExceptionpublic static List<Integer> parameterIndices(String s)
s. Each
 formal parameter occurs in s as a string like "#1" or "#4". This routine does not do proper
 parsing; for instance, if "#2" appears within a string in s, then 2 would still be in the
 result list.s.public static FlowExpressions.Receiver internalReprOfVariable(AnnotatedTypeFactory provider, VariableTree tree) throws FlowExpressionParseUtil.FlowExpressionParseException