Class CipPath.CompositeParser
- java.lang.Object
-
- com.automation_pros.odva.cip.path.CipPath.CompositeParser
-
- All Implemented Interfaces:
PathTokenParser
- Enclosing class:
- CipPath
public static class CipPath.CompositeParser extends java.lang.Object implements PathTokenParser
A parser factory for keywords that call multiple other parsers to produces a segment list. Subclasses of PathSegment that offer keywords that resolve to multiple elements use this factory to register the keywords. To be reversible, the parser list should be one or more static parsers followed by a single variable parser.
-
-
Field Summary
Fields Modifier and Type Field Description PathTokenParser[]
parsers
-
Constructor Summary
Constructors Constructor Description CompositeParser(PathTokenParser... parsers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CipPath
parse(java.util.List<java.lang.String> tokens)
Given the parameters for a token as a list of strings, return a list of Path Segments.
-
-
-
Field Detail
-
parsers
public final PathTokenParser[] parsers
-
-
Constructor Detail
-
CompositeParser
public CompositeParser(PathTokenParser... parsers)
-
-
Method Detail
-
parse
public CipPath parse(java.util.List<java.lang.String> tokens)
Description copied from interface:PathTokenParser
Given the parameters for a token as a list of strings, return a list of Path Segments. The keyword token is already removed from the list. This method must remove the parameter tokens it consumes.- Specified by:
parse
in interfacePathTokenParser
- Returns:
-
-