if (element.getCode() == null && element.getObject() == null) throw new ParseException("<" + buf.toString().replace('\n', ' ').replace('\r', ' ').replace('\t', ' ').trim() + "> is missing mandatory CODE | OBJECT attribute", 0); if (element.getArchives().size() == 0)
/** * Install a mbean with mbean metadata<p> * * @param element the data parsed from the Mlet file * * @return mbean instance */ public ObjectInstance installMBean(MBeanElement element) throws MBeanException, ReflectionException, InstanceNotFoundException, MalformedObjectNameException { log.debug("Installing MBean: " + element); ObjectInstance instance = null; ObjectName elementName = getElementName(element); if (element.getVersions().isEmpty() || !server.isRegistered(elementName)) { if (element.getCode() != null) instance = createMBean(element); else if (element.getObject() != null) instance = deserialize(element); else throw new MBeanException(new IllegalArgumentException("No code or object tag")); } else instance = updateMBean(element); return instance; }