Changeset 12
- Timestamp:
- 07/04/05 12:55:19 (4 years ago)
- Files:
-
- trunk/src/net/schst/XJConf/TagDefinition.java (modified) (1 diff)
- trunk/src/net/schst/XJConf/XmlReader.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/net/schst/XJConf/TagDefinition.java
r10 r12 254 254 } else { 255 255 Class childParamTypes[] = {childValue.getClass()}; 256 Method childMethod = null; 256 257 257 Method childMethod = cl.getMethod(methodName, childParamTypes); 258 try { 259 childMethod = cl.getMethod(methodName, childParamTypes); 260 } catch (NoSuchMethodException e) { 261 Class interfaces[] = childValue.getClass().getInterfaces(); 262 for (int j = 0; j < interfaces.length; j++) { 263 try { 264 Class childParamTypes2[] = {interfaces[j]}; 265 childMethod = cl.getMethod(methodName, childParamTypes2); 266 } catch (Exception ex) { 267 continue; 268 } 269 break; 270 } 271 } 272 if (childMethod == null) { 273 throw new ValueConversionException("Could not add child " + child.getKey() + " to " + this.getType() + " using "+methodName+"()."); 274 } 258 275 childMethod.invoke(instance, childParams); 259 276 } trunk/src/net/schst/XJConf/XmlReader.java
r10 r12 204 204 } 205 205 if (!this.tagDefs.isTagDefined(namespaceURI, sName)) { 206 throw new UnknownTagException("Unknown tag " + sName );206 throw new UnknownTagException("Unknown tag " + sName + " in namespace " + namespaceURI); 207 207 } 208 208 }
