From 0dbcc1f4af7afb19e82c30bda98752204a5b75cb Mon Sep 17 00:00:00 2001 From: "Adrian T. Co" Date: Wed, 28 Jun 2006 08:44:29 +0000 Subject: [PATCH] Modify the reflection utility to be able to recognize property of type object and setter with string param. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@417699 13f79535-47bb-0310-9956-ffa450edef68 --- .../tool/properties/ReflectionUtil.java | 213 +++++++++++------- .../spi/ClassLoaderSPIConnectionFactory.java | 3 +- .../activemq/tool/ReflectionUtilTest.java | 62 +++-- 3 files changed, 158 insertions(+), 120 deletions(-) diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java index 0c73f627f4..8b7837fcee 100644 --- a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java +++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java @@ -23,10 +23,9 @@ import java.util.StringTokenizer; import java.util.Properties; import java.util.List; import java.util.ArrayList; -import java.util.Arrays; import java.lang.reflect.Method; -import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Constructor; public final class ReflectionUtil { private static final Log log = LogFactory.getLog(ReflectionUtil.class); @@ -47,7 +46,7 @@ public final class ReflectionUtil { StringTokenizer tokenizer = new StringTokenizer(key, "."); int tokenCount = tokenizer.countTokens(); - // For nested settings, get the object first. -2, do not count the first and last token + // For nested settings, get the object first. -1, do not count the last token for (int j=0; j