summaryrefslogtreecommitdiffstats
path: root/proxy/code/src/org
diff options
context:
space:
mode:
authorjesus m. rodriguez <jesusr@redhat.com>2009-07-10 14:55:29 -0400
committerjesus m. rodriguez <jesusr@redhat.com>2009-07-10 14:55:29 -0400
commit653090b23b16b303e2147e33a2013a92fb66aed4 (patch)
tree6a04f3dcb33257d5284b0159a9a05724c20d4062 /proxy/code/src/org
parent2f97465f7aef7c22994dcb11041beb6f1f1fd8eb (diff)
remove unused methods
Diffstat (limited to 'proxy/code/src/org')
-rw-r--r--proxy/code/src/org/fedoraproject/candlepin/model/ObjectFactory.java64
1 files changed, 0 insertions, 64 deletions
diff --git a/proxy/code/src/org/fedoraproject/candlepin/model/ObjectFactory.java b/proxy/code/src/org/fedoraproject/candlepin/model/ObjectFactory.java
index ef0f4eb..936e9cc 100644
--- a/proxy/code/src/org/fedoraproject/candlepin/model/ObjectFactory.java
+++ b/proxy/code/src/org/fedoraproject/candlepin/model/ObjectFactory.java
@@ -134,70 +134,6 @@ public class ObjectFactory {
}
return null;
}
-
- /**
- * Create a new instance of the classname passed in.
- *
- * @param className
- * @return instance of class passed in.
- */
- private static Object callNewMethod(String className, Object... args) {
- Object retval = null;
-
- try {
- Class<?> clazz = Thread.currentThread().
- getContextClassLoader().loadClass(className);
- if (args == null || args.length == 0) {
- retval = clazz.newInstance();
- }
- else {
- try {
- Constructor[] ctors = clazz.getConstructors();
- for (Constructor ctor : ctors) {
- if (isCompatible(ctor.getParameterTypes(), args)) {
- return ctor.newInstance(args);
- }
- }
- }
- catch (IllegalArgumentException e) {
- throw new RuntimeException(e);
- }
- catch (InvocationTargetException e) {
- throw new RuntimeException(e);
- }
- }
-
- }
- catch (InstantiationException e) {
- throw new RuntimeException(e);
- }
- catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- }
- catch (ClassNotFoundException e) {
- throw new RuntimeException(e);
- }
-
- return retval;
- }
-
- /* This is insanity itself, but the reflection APIs ignore inheritance.
- * So, if you ask for a method that accepts (Integer, HashMap, HashMap),
- * and the class only has (Integer, Map, Map), you won't find the method.
- * This method uses Class.isAssignableFrom to solve this problem.
- */
- private static boolean isCompatible(Class[] declaredParams, Object[] params) {
- if (params.length != declaredParams.length) {
- return false;
- }
-
- for (int i = 0; i < params.length; i++) {
- if (!declaredParams[i].isInstance(params[i])) {
- return false;
- }
- }
- return true;
- }
/**
* Store an object