@Test public void testParseAnonymousTrapParent() { List<CheckReference<?>> refs = VirtualCheckExpressionParser.parseParentsExpression("trap 'port_e1/1'"); assertThat(refs, is(notNullValue())); assertThat(refs.size(), is(equalTo(1))); assertThat(refs.get(0), is(notNullValue())); assertThat(refs.get(0), is(instanceOf(AnonymousTrap.class))); assertThat(refs.get(0), is(hasProperty("name", equalTo("port_e1/1")))); }
public static final List<CheckReference<?>> parseParentsExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readParents(); } } catch (Exception e) { throw new RuntimeException("Failed to parse parents expression: '" + expression + "'", e); } }
VirtualCheckExpressionParser { public static final List<CheckReference<?>> parseParentsExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readParents(); } } catch (Exception e) { throw new RuntimeException("Failed to parse parents expression: '" + expression + "'", e); } } }
VirtualCheckExpressionParser { public static final List<CheckReference<?>> parseParentsExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readParents(); } } catch (Exception e) { throw new RuntimeException("Failed to parse parents expression: '" + expression + "'", e); } }  }
VirtualCheckExpressionParser { public static final List<CheckReference<?>> parseParentsExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readParents(); } } catch (Exception e) { throw new RuntimeException("Failed to parse parents expression: '" + expression + "'", e); } }  static final VirtualCheckOperator parseVirtualCheckExpression(String expression); static final List<CheckReference<?>> parseParentsExpression(String expression); }
VirtualCheckExpressionParser { public static final List<CheckReference<?>> parseParentsExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readParents(); } } catch (Exception e) { throw new RuntimeException("Failed to parse parents expression: '" + expression + "'", e); } }  static final VirtualCheckOperator parseVirtualCheckExpression(String expression); static final List<CheckReference<?>> parseParentsExpression(String expression);  }