Class CipPath.StaticParser
- java.lang.Object
-
- com.automation_pros.odva.cip.path.CipPath.StaticParser
-
- All Implemented Interfaces:
PathTokenParser
- Enclosing class:
- CipPath
public static class CipPath.StaticParser extends java.lang.Object implements PathTokenParser
A parser factory for keywords that will simply return a constant path segment. Subclasses of PathSegment that offer keywords that resolves to constants use this factory to register the keywords.
-
-
Constructor Summary
Constructors Constructor Description StaticParser(CipPath segments)
StaticParser(PathSegment... segments)
-
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
-
segments
public final CipPath segments
-
-
Constructor Detail
-
StaticParser
public StaticParser(PathSegment... segments)
-
StaticParser
public StaticParser(CipPath segments)
-
-
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:
-
-