/** * @param in * If provided, this is used to record the source location where this DOM object is loaded from. * Otherwise this can be null. */ public Dom(ServiceLocator habitat, DomDocument document, Dom parent, ConfigModel model, XMLStreamReader in) { super(createDescriptor( model.targetTypeName, model.injector.getLoader(), model.injector.getMetadata())); this.habitat = habitat; if (in!=null) { this.location = new LocationImpl(in.getLocation()); } else { this.location=null; } this.model = model; this.document = document; this.parent = parent; // TODO: This code is disabled as it does fail from time to time when assertions are enabled // assert (parent==null || parent.document==document); // all the nodes in the tree must belong to the same document }
protected Class<?> loadClass(String type) throws ClassNotFoundException { HK2Loader loader = myself.getLoader(); if (loader == null) { return getClass().getClassLoader().loadClass(type); } try { return loader.loadClass(type); } catch (MultiException me) { for (Throwable th : me.getErrors()) { if (th instanceof ClassNotFoundException) { throw (ClassNotFoundException) th; } } throw new ClassNotFoundException(me.getMessage()); } }
private Class<?> loadClass(final String cname) throws ClassNotFoundException { List<ActiveDescriptor<?>> descriptors; // non-services are not known by HK2 if ("com.oracle.cloudlogic.accountmanager.cli.AccountAwareJobImpl".equals(cname)) { descriptors = getDescriptors("com.oracle.cloudlogic.accountmanager.cli.AccountAwareJobCreator"); } else { descriptors = getDescriptors(cname); } if (descriptors.size() > 0) { try { return descriptors.get(0).getLoader().loadClass(cname); } catch (MultiException ex) { throw ex; } } else { throw new ClassNotFoundException(cname); } }
/** * @param in * If provided, this is used to record the source location where this DOM object is loaded from. * Otherwise this can be null. */ public Dom(ServiceLocator habitat, DomDocument document, Dom parent, ConfigModel model, XMLStreamReader in) { super(createDescriptor( model.targetTypeName, model.injector.getLoader(), model.injector.getMetadata())); this.habitat = habitat; if (in!=null) { this.location = new LocationImpl(in.getLocation()); } else { this.location=null; } this.model = model; this.document = document; this.parent = parent; // TODO: This code is disabled as it does fail from time to time when assertions are enabled // assert (parent==null || parent.document==document); // all the nodes in the tree must belong to the same document }
/** * @param in * If provided, this is used to record the source location where this DOM object is loaded from. * Otherwise this can be null. */ public Dom(ServiceLocator habitat, DomDocument document, Dom parent, ConfigModel model, XMLStreamReader in) { super(createDescriptor( model.targetTypeName, model.injector.getLoader(), model.injector.getMetadata())); this.habitat = habitat; if (in!=null) { this.location = new LocationImpl(in.getLocation()); } else { this.location=null; } this.model = model; this.document = document; this.parent = parent; // TODO: This code is disabled as it does fail from time to time when assertions are enabled // assert (parent==null || parent.document==document); // all the nodes in the tree must belong to the same document }
HK2Loader loader = descriptor.getLoader();
HK2Loader loader = descriptor.getLoader();
HK2Loader loader = descriptor.getLoader();
HK2Loader loader = descriptor.getLoader();