private void extractAttributes(ExtendedStatistics extendedStatistics, List<AttributeProxy> proxies, Method m) throws IllegalAccessException, InvocationTargetException { if (m.getReturnType().equals(ValueStatistic.class)) { ValueStatistic stat = (ValueStatistic) m.invoke(extendedStatistics, new Object[0]); if (stat != null) { recordValueStatistic(proxies, stat, "cache.", m); } } else if (m.getReturnType().equals(ExtendedStatistics.Statistic.class)) { Statistic<Number> stat = (Statistic<Number>) m.invoke(extendedStatistics, new Object[0]); if (stat != null) { recordStatistic(proxies, stat, "cache.", m); } } else if (m.getReturnType().equals(ExtendedStatistics.Result.class)) { Result res = (Result) m.invoke(extendedStatistics, new Object[0]); if (res != null) { recordResult(proxies, res, m.getName()); } } else if (m.getReturnType().equals(ExtendedStatistics.Operation.class)) { Operation op = (Operation) m.invoke(extendedStatistics, new Object[0]); if (op.type() != null && op.type().isEnum() && op.type().getEnumConstants() != null) { recordOperation(proxies, extendedStatistics, m.getName(), op); } } }
for (Object t : op.type().getEnumConstants()) { String camelCase = t.toString().toLowerCase(); camelCase = (Character.toUpperCase(camelCase.charAt(0))) + camelCase.substring(1);
private void extractAttributes(ExtendedStatistics extendedStatistics, List<AttributeProxy> proxies, Method m) throws IllegalAccessException, InvocationTargetException { if (m.getReturnType().equals(ValueStatistic.class)) { ValueStatistic stat = (ValueStatistic) m.invoke(extendedStatistics, new Object[0]); if (stat != null) { recordValueStatistic(proxies, stat, "cache.", m); } } else if (m.getReturnType().equals(ExtendedStatistics.Statistic.class)) { Statistic<Number> stat = (Statistic<Number>) m.invoke(extendedStatistics, new Object[0]); if (stat != null) { recordStatistic(proxies, stat, "cache.", m); } } else if (m.getReturnType().equals(ExtendedStatistics.Result.class)) { Result res = (Result) m.invoke(extendedStatistics, new Object[0]); if (res != null) { recordResult(proxies, res, m.getName()); } } else if (m.getReturnType().equals(ExtendedStatistics.Operation.class)) { Operation op = (Operation) m.invoke(extendedStatistics, new Object[0]); if (op.type() != null && op.type().isEnum() && op.type().getEnumConstants() != null) { recordOperation(proxies, extendedStatistics, m.getName(), op); } } }
for (Object t : op.type().getEnumConstants()) { String camelCase = t.toString().toLowerCase(); camelCase = (Character.toUpperCase(camelCase.charAt(0))) + camelCase.substring(1);
for (Object t : op.type().getEnumConstants()) { String camelCase = t.toString().toLowerCase(); camelCase = (Character.toUpperCase(camelCase.charAt(0))) + camelCase.substring(1);
private void extractAttributes(ExtendedStatistics extendedStatistics, List<AttributeProxy> proxies, Method m) throws IllegalAccessException, InvocationTargetException { if (m.getReturnType().equals(ValueStatistic.class)) { ValueStatistic stat = (ValueStatistic) m.invoke(extendedStatistics, new Object[0]); if (stat != null) { recordValueStatistic(proxies, stat, "cache.", m); } } else if (m.getReturnType().equals(ExtendedStatistics.Statistic.class)) { Statistic<Number> stat = (Statistic<Number>) m.invoke(extendedStatistics, new Object[0]); if (stat != null) { recordStatistic(proxies, stat, "cache.", m); } } else if (m.getReturnType().equals(ExtendedStatistics.Result.class)) { Result res = (Result) m.invoke(extendedStatistics, new Object[0]); if (res != null) { recordResult(proxies, res, m.getName()); } } else if (m.getReturnType().equals(ExtendedStatistics.Operation.class)) { Operation op = (Operation) m.invoke(extendedStatistics, new Object[0]); if (op.type() != null && op.type().isEnum() && op.type().getEnumConstants() != null) { recordOperation(proxies, extendedStatistics, m.getName(), op); } } }