public Object configure(Object obj) throws Exception { // Check the class of the object Class<?> oClass = nodeClass(_root); if (oClass != null && !oClass.isInstance(obj)) { String loaders = (oClass.getClassLoader()==obj.getClass().getClassLoader())?"":"Object Class and type Class are from different loaders."; throw new IllegalArgumentException("Object of class '"+obj.getClass().getCanonicalName()+"' is not of type '" + oClass.getCanonicalName()+"'. "+loaders); } configure(obj,_root,0); return obj; }
public Object configure(Object obj) throws Exception { // Check the class of the object Class<?> oClass = nodeClass(_config); if (oClass != null && !oClass.isInstance(obj)) { String loaders = (oClass.getClassLoader()==obj.getClass().getClassLoader())?"":"Object Class and type Class are from different loaders."; throw new IllegalArgumentException("Object of class '"+obj.getClass().getCanonicalName()+"' is not of type '" + oClass.getCanonicalName()+"'. "+loaders+" in "+_url); } configure(obj,_config,0); return obj; }
public Object configure(Object obj) throws Exception { // Check the class of the object Class<?> oClass = nodeClass(_config); if (oClass != null && !oClass.isInstance(obj)) { String loaders = (oClass.getClassLoader()==obj.getClass().getClassLoader())?"":"Object Class and type Class are from different loaders."; throw new IllegalArgumentException("Object of class '"+obj.getClass().getCanonicalName()+"' is not of type '" + oClass.getCanonicalName()+"'. "+loaders+" in "+_url); } configure(obj,_config,0); return obj; }
private Object propertyObj(XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); String name = node.getAttribute("name"); String defaultValue = node.getAttribute("default"); Object prop; Map<String,String> property_map=_configuration.getProperties(); if (property_map != null && property_map.containsKey(name)) prop = property_map.get(name); else prop = defaultValue; if (id != null) _configuration.getIdMap().put(id,prop); if (prop != null) configure(prop,node,0); return prop; }
@Override public Object configure(Object obj) throws Exception { // Check the class of the object Class<?> oClass = nodeClass(_root); if (oClass != null && !oClass.isInstance(obj)) { String loaders = (oClass.getClassLoader()==obj.getClass().getClassLoader())?"":"Object Class and type Class are from different loaders."; throw new IllegalArgumentException("Object of class '"+obj.getClass().getCanonicalName()+"' is not of type '" + oClass.getCanonicalName()+"'. "+loaders+" in "+_url); } String id=_root.getAttribute("id"); if (id!=null) _configuration.getIdMap().put(id,obj); configure(obj,_root,0); return obj; }
private Object propertyObj(XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); String name = node.getAttribute("name"); String defaultValue = node.getAttribute("default"); Object prop; Map<String,String> property_map=_configuration.getProperties(); if (property_map != null && property_map.containsKey(name)) prop = property_map.get(name); else prop = defaultValue; if (id != null) _configuration.getIdMap().put(id,prop); if (prop != null) configure(prop,node,0); return prop; }
private Object propertyObj(XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); String name = node.getAttribute("name"); String defaultValue = node.getAttribute("default"); Object prop; if (_propertyMap != null && _propertyMap.containsKey(name)) prop = _propertyMap.get(name); else prop = defaultValue; if (id != null) _idMap.put(id,prop); if (prop != null) configure(prop,node,0); return prop; }
private Object propertyObj(XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); String name = node.getAttribute("name"); String defaultValue = node.getAttribute("default"); Object prop; if (_propertyMap != null && _propertyMap.containsKey(name)) prop = _propertyMap.get(name); else prop = defaultValue; if (id != null) _idMap.put(id,prop); if (prop != null) configure(prop,node,0); return prop; }
private Object propertyObj(XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); String name = node.getAttribute("name"); String defaultValue = node.getAttribute("default"); Object prop; Map<String,String> property_map=_configuration.getProperties(); if (property_map != null && property_map.containsKey(name)) prop = property_map.get(name); else prop = defaultValue; if (id != null) _configuration.getIdMap().put(id,prop); if (prop != null) configure(prop,node,0); return prop; }
public Object configure() throws Exception { Class<?> oClass = nodeClass(_root); String id = _root.getAttribute("id"); Object obj = id == null?null:_configuration.getIdMap().get(id); if (obj == null && oClass != null) { obj = oClass.newInstance(); _configuration.initializeDefaults(obj); } if (oClass != null && !oClass.isInstance(obj)) throw new ClassCastException(oClass.toString()); configure(obj,_root,0); return obj; }
public Object configure() throws Exception { Class<?> oClass = nodeClass(_root); String id = _root.getAttribute("id"); Object obj = id == null?null:_configuration.getIdMap().get(id); if (obj == null && oClass != null) { obj = oClass.newInstance(); _configuration.initializeDefaults(obj); } if (oClass != null && !oClass.isInstance(obj)) throw new ClassCastException(oClass.toString()); configure(obj,_root,0); return obj; }
public Object configure() throws Exception { Class<?> oClass = nodeClass(_root); String id = _root.getAttribute("id"); Object obj = id == null?null:_configuration.getIdMap().get(id); if (obj == null && oClass != null) { obj = oClass.newInstance(); _configuration.initializeDefaults(obj); } if (oClass != null && !oClass.isInstance(obj)) throw new ClassCastException(oClass.toString()); configure(obj,_root,0); return obj; }
public Object configure(Object obj) throws Exception { // Check the class of the object Class<?> oClass = nodeClass(_root); if (oClass != null && !oClass.isInstance(obj)) { String loaders = (oClass.getClassLoader()==obj.getClass().getClassLoader())?"":"Object Class and type Class are from different loaders."; throw new IllegalArgumentException("Object of class '"+obj.getClass().getCanonicalName()+"' is not of type '" + oClass.getCanonicalName()+"'. "+loaders); } configure(obj,_root,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String refid = node.getAttribute("refid"); if (refid==null) refid = node.getAttribute("id"); obj = _idMap.get(refid); if (obj == null && node.size()>0) throw new IllegalStateException("No object for refid=" + refid); configure(obj,node,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String refid = node.getAttribute("refid"); if (refid==null) refid = node.getAttribute("id"); obj = _configuration.getIdMap().get(refid); if (obj == null && node.size()>0) throw new IllegalStateException("No object for refid=" + refid); configure(obj,node,0); return obj; }
public Object configure(Object obj) throws Exception { // Check the class of the object Class<?> oClass = nodeClass(_root); if (oClass != null && !oClass.isInstance(obj)) { String loaders = (oClass.getClassLoader()==obj.getClass().getClassLoader())?"":"Object Class and type Class are from different loaders."; throw new IllegalArgumentException("Object of class '"+obj.getClass().getCanonicalName()+"' is not of type '" + oClass.getCanonicalName()+"'. "+loaders); } configure(obj,_root,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String refid = node.getAttribute("refid"); if (refid==null) refid = node.getAttribute("id"); obj = _idMap.get(refid); if (obj == null && node.size()>0) throw new IllegalStateException("No object for refid=" + refid); configure(obj,node,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); obj = _configuration.getIdMap().get(id); if (obj == null) throw new IllegalStateException("No object for id=" + id); configure(obj,node,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); obj = _configuration.getIdMap().get(id); if (obj == null) throw new IllegalStateException("No object for id=" + id); configure(obj,node,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); obj = _configuration.getIdMap().get(id); if (obj == null) throw new IllegalStateException("No object for id=" + id); configure(obj,node,0); return obj; }