FunctionIndexProcessor { public static String[] getProperties(String[] functionCode) { ArrayList<String> properties = new ArrayList<>(); for(String token : functionCode) { if (token.startsWith("@")) { String propertyName = token.substring(1); properties.add(propertyName); } } return properties.toArray(new String[0]); } protected  FunctionIndexProcessor(String function); static String[] getProperties(String[] functionCode); static PropertyState tryCalculateValue(String path, NodeState state, String[] functionCode); static String[] getFunctionCode(String functionDescription); static String convertToPolishNotation(String function);  }
@Test public void getProperties() { assertEquals( "[a, test/b, test/:name]", Arrays.toString( FunctionIndexProcessor.getProperties(new String[] { "function", "multiply", "@a", "add", "@test/b", "@test/:name" }))); }