@Test public void getObjectProperty_JavaBean() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Person bond = new Person("James Bond", 42, "London"); bond.setDummy(new Dummy("007")); String name = (String) Util.getObjectProperty(bond, "name"); String number = (String) Util.getObjectProperty(bond, "dummy.strValue"); assertEquals("James Bond", name); assertEquals("007", number); }
public static Object getObjectProperty(Object obj, String propertyName, boolean failSilently) { try { return getObjectProperty(obj, propertyName); } catch (Exception e) { String msg = "failed to get property '" + propertyName + "' of object " + obj; if (failSilently) { logger.info(msg, e); return null; } else { logger.warn(msg); throw new IllegalArgumentException(e); } } }
Util { public static Object getObjectProperty(Object obj, String propertyName, boolean failSilently) { try { return getObjectProperty(obj, propertyName); } catch (Exception e) { String msg = "failed to get property '" + propertyName + "' of object " + obj; if (failSilently) { logger.info(msg, e); return null; } else { logger.warn(msg); throw new IllegalArgumentException(e); } } } }
Util { public static Object getObjectProperty(Object obj, String propertyName, boolean failSilently) { try { return getObjectProperty(obj, propertyName); } catch (Exception e) { String msg = "failed to get property '" + propertyName + "' of object " + obj; if (failSilently) { logger.info(msg, e); return null; } else { logger.warn(msg); throw new IllegalArgumentException(e); } } }  }
Util { public static Object getObjectProperty(Object obj, String propertyName, boolean failSilently) { try { return getObjectProperty(obj, propertyName); } catch (Exception e) { String msg = "failed to get property '" + propertyName + "' of object " + obj; if (failSilently) { logger.info(msg, e); return null; } else { logger.warn(msg); throw new IllegalArgumentException(e); } } }  static List<String> getFormulaCellRefs(String formula); static List<String> getJointedCellRefs(String formula); static List<String> getCellRefsFromJointedCellRef(String jointedCellRef); static boolean formulaContainsJointedCellRef(String formula); static String createTargetCellRef(List<CellRef> targetCellDataList); static String joinStrings(List<String> strings, String separator); static List<List<CellRef>> groupByRanges(List<CellRef> cellRefList, int targetRangeCount); static List<List<CellRef>> groupByColRange(List<CellRef> cellRefList); static List<List<CellRef>> groupByRowRange(List<CellRef> cellRefList); static Boolean isConditionTrue(ExpressionEvaluator evaluator, String condition, Context context); static Boolean isConditionTrue(ExpressionEvaluator evaluator, Context context); static void setObjectProperty(Object obj, String propertyName, String propertyValue, boolean ignoreNonExisting); static void setObjectProperty(Object obj, String propertyName, String propertyValue); static Object getObjectProperty(Object obj, String propertyName, boolean failSilently); static Object getObjectProperty(Object obj, String propertyName); static Collection<GroupData> groupCollection(Collection<?> collection, String groupProperty, String groupOrder); static Collection<GroupData> groupIterable(Iterable<?> iterable, String groupProperty, String groupOrder); static byte[] toByteArray(InputStream stream); static Collection<?> transformToCollectionObject(ExpressionEvaluator expressionEvaluator, String collectionName, Context context); static String sheetNameRegex(Map.Entry<CellRef, List<CellRef>> cellRefEntry); static List<CellRef> createTargetCellRefListByColumn(CellRef targetFormulaCellRef, List<CellRef> targetCells,
            List<CellRef> cellRefsToExclude); static int countOccurences(String str, char ch); static Iterable<Object> transformToIterableObject(ExpressionEvaluator expressionEvaluator, String collectionName, Context context); static String getStrictCellNameRegex(String name); }
Util { public static Object getObjectProperty(Object obj, String propertyName, boolean failSilently) { try { return getObjectProperty(obj, propertyName); } catch (Exception e) { String msg = "failed to get property '" + propertyName + "' of object " + obj; if (failSilently) { logger.info(msg, e); return null; } else { logger.warn(msg); throw new IllegalArgumentException(e); } } }  static List<String> getFormulaCellRefs(String formula); static List<String> getJointedCellRefs(String formula); static List<String> getCellRefsFromJointedCellRef(String jointedCellRef); static boolean formulaContainsJointedCellRef(String formula); static String createTargetCellRef(List<CellRef> targetCellDataList); static String joinStrings(List<String> strings, String separator); static List<List<CellRef>> groupByRanges(List<CellRef> cellRefList, int targetRangeCount); static List<List<CellRef>> groupByColRange(List<CellRef> cellRefList); static List<List<CellRef>> groupByRowRange(List<CellRef> cellRefList); static Boolean isConditionTrue(ExpressionEvaluator evaluator, String condition, Context context); static Boolean isConditionTrue(ExpressionEvaluator evaluator, Context context); static void setObjectProperty(Object obj, String propertyName, String propertyValue, boolean ignoreNonExisting); static void setObjectProperty(Object obj, String propertyName, String propertyValue); static Object getObjectProperty(Object obj, String propertyName, boolean failSilently); static Object getObjectProperty(Object obj, String propertyName); static Collection<GroupData> groupCollection(Collection<?> collection, String groupProperty, String groupOrder); static Collection<GroupData> groupIterable(Iterable<?> iterable, String groupProperty, String groupOrder); static byte[] toByteArray(InputStream stream); static Collection<?> transformToCollectionObject(ExpressionEvaluator expressionEvaluator, String collectionName, Context context); static String sheetNameRegex(Map.Entry<CellRef, List<CellRef>> cellRefEntry); static List<CellRef> createTargetCellRefListByColumn(CellRef targetFormulaCellRef, List<CellRef> targetCells,
            List<CellRef> cellRefsToExclude); static int countOccurences(String str, char ch); static Iterable<Object> transformToIterableObject(ExpressionEvaluator expressionEvaluator, String collectionName, Context context); static String getStrictCellNameRegex(String name); static final String regexJointedLookBehind; static final String regexSimpleCellRef; static final String regexCellRef; static final String regexAreaRef; static final Pattern regexAreaRefPattern; static final String regexCellRefExcludingJointed; static final String regexJointedCellRef; static final String regexExcludePrefixSymbols; }