@Test public void testHashMapMixedCase() { final SubroutineDeclaration declaration = parser .parse("declare myMap(mode = vc, mapKey = vc, mapVal = i4) = i4 with protect, map='hAsH'"); assertThat(declaration.getName()).isEqualTo("myMap"); assertThat(declaration.getReturnType().getDataType()).isEqualTo(DataType.I4); final List<SubroutineArgumentDeclaration> argDeclarations = declaration.getArguments(); assertThat(argDeclarations).hasSize(3); final SubroutineArgumentDeclaration arg1Declaration = argDeclarations.get(0); assertThat(arg1Declaration.getName()).isEqualTo("mode"); assertThat(arg1Declaration.getDataType()).isEqualTo(DataType.VC); assertThat(arg1Declaration.isByRef()).isFalse(); final SubroutineArgumentDeclaration arg2Declaration = argDeclarations.get(1); assertThat(arg2Declaration.getName()).isEqualTo("mapKey"); assertThat(arg2Declaration.getDataType()).isEqualTo(DataType.VC); assertThat(arg2Declaration.isByRef()).isFalse(); final SubroutineArgumentDeclaration arg3Declaration = argDeclarations.get(2); assertThat(arg3Declaration.getName()).isEqualTo("mapVal"); assertThat(arg3Declaration.getDataType()).isEqualTo(DataType.I4); assertThat(arg3Declaration.isByRef()).isFalse(); }
public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } } }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }  }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }  SubroutineDeclaration parse(final String declaration); }
SubroutineDeclarationParser { public SubroutineDeclaration parse(final String declaration) { if (declaration == null) { throw new IllegalArgumentException("Subroutine declaration cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); String reducedDeclaration = reduceDeclaration(uncommentDeclaration(declaration).trim()); try { return new SubroutineDeclaration(parseName(declaration, reducedDeclaration), parseReturnType(declaration, reducedDeclaration), parseArguments(reducedDeclaration)); } finally { point.collect(); } }  SubroutineDeclaration parse(final String declaration);  }