Revision: 99
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=99&view=rev
Author: rickles
Date: 2007-03-03 02:51:03 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Cleaned up code.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java
sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java 2007-03-03 10:50:07 UTC (rev 98)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/ConfigHandler.java 2007-03-03 10:51:03 UTC (rev 99)
@@ -15,7 +15,7 @@
SimpleElement element = null;
String key = null;
try {
- element = (SimpleElement)Class.forName("org.digivitality.techne.core.util." + qname).newInstance();
+ element = (SimpleElement)Class.forName("org.digivitality.techne.core.util." + qname).newInstance();
} catch (Exception e) {/*No class for element*/}
for(int i=0; i<atts.getLength(); i++) {
@@ -32,9 +32,6 @@
if (!stack.empty()) {
try {
- //System.out.println("qname: " + qname);
- //System.out.println("stack object: " + stack.peek());
- //System.out.println("element: " + element);
setProperty(qname, stack.peek(), element );
} catch (Exception e) {
e.printStackTrace();
@@ -48,26 +45,13 @@
}
void setProperty(String name, Object target, Object value) throws SAXException {
- //System.out.println("property: " + name);
- //System.out.println("target: " + target.getClass());
- //System.out.println("value: " + value.getClass());
Method method = null;
try {
method = target.getClass().getMethod(
"add" + name, new Class[] { value.getClass() } );
- // invoke the method
- //System.out.println("Method to execute: " + method.toString());
method.invoke(target, new Object[]{value});
} catch (Exception e) {throw new SAXException(e.toString()); }
- /*
- if (method == null) {
- try {
- method = target.getClass().getMethod(
- "set" + name, new Class[] { value.getClass()} );
- method.invoke(target.getClass().newInstance(), new Object[]{value});
- } catch (Exception e) {throw new SAXException(e.toString()); }
- }
- */
+
if (method == null) {
throw new SAXException("No add method detected for " + target.getClass());
}
Modified: sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java 2007-03-03 10:50:07 UTC (rev 98)
+++ sandbox/rickles/org.digivitality.techne.core/src/org/digivitality/techne/core/util/containertype.java 2007-03-03 10:51:03 UTC (rev 99)
@@ -6,7 +6,7 @@
public class containertype extends SimpleElement {
List bundles = new ArrayList();
- String value;
+ public String value;
String base;
public void addbundle(bundle b) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|