InternalError ie = new InternalError(e.getMessage()); ie.initCause(e); throw ie;
if (setter != null && setter.getParameterTypes()[0].equals(signature[0]) == false) throw new IntrospectionException("overloaded type for attribute set: " + key); if (getter != null && getter.getName().startsWith("is")) throw new IntrospectionException("mixed use of get/is for attribute " + key); if (getter != null && getter.getName().startsWith("get")) throw new IntrospectionException("mixed use of get/is for attribute " + key); throw new NotCompliantMBeanException(e.getMessage());
public PlainMBeanMirror(MBeanServerConnection mbsc, ObjectName objectName, ObjectName localObjectName) throws IOException, InstanceNotFoundException, IntrospectionException { this.mbsc = mbsc; this.objectName = objectName; this.localObjectName = localObjectName; try { this.mbeanInfo = mbsc.getMBeanInfo(objectName); } catch (ReflectionException e) { // Callers cannot possibly care about the difference between // IntrospectionException and ReflectionException IntrospectionException ie = new IntrospectionException(e.getMessage()); ie.initCause(e); throw ie; } }
public static void addURLToSystemClassLoader(URL url) throws IntrospectionException { URLClassLoader systemClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class<URLClassLoader> classLoaderClass = URLClassLoader.class; try { Method method = classLoaderClass.getDeclaredMethod("addURL", new Class[] { URL.class }); method.setAccessible(true); method.invoke(systemClassLoader, new Object[] { url }); } catch (Throwable t) { t.printStackTrace(); throw new IntrospectionException("Error when adding url to system ClassLoader "); } } }
e.printStackTrace(System.err); } catch (IntrospectionException e) { e.printStackTrace(System.err); } catch (ReflectionException e) { e.printStackTrace(System.err);
throw new MBeanProxyCreationException(e.toString());
if (setter != null && setter.getParameterTypes()[0].equals(signature[0]) == false) throw new IntrospectionException("overloaded type for attribute set: " + key); if (getter != null && getter.getName().startsWith("is")) throw new IntrospectionException("mixed use of get/is for attribute " + key); if (getter != null && getter.getName().startsWith("get")) throw new IntrospectionException("mixed use of get/is for attribute " + key); throw new NotCompliantMBeanException(e.getMessage());
public PlainMBeanMirror(MBeanServerConnection mbsc, ObjectName objectName, ObjectName localObjectName) throws IOException, InstanceNotFoundException, IntrospectionException { this.mbsc = mbsc; this.objectName = objectName; this.localObjectName = localObjectName; try { this.mbeanInfo = mbsc.getMBeanInfo(objectName); } catch (ReflectionException e) { // Callers cannot possibly care about the difference between // IntrospectionException and ReflectionException IntrospectionException ie = new IntrospectionException(e.getMessage()); ie.initCause(e); throw ie; } }
Method setter = setters.get(key); if (setter != null && setter.getGenericParameterTypes()[0].equals(signature[0]) == false) throw new IntrospectionException("overloaded type for attribute set: " + key); setters.put(key, method); Method getter = getters.get(key); if (getter != null && getter.getName().startsWith("is")) throw new IntrospectionException("mixed use of get/is for attribute " + key); getters.put(key, method); Method getter = getters.get(key); if (getter != null && getter.getName().startsWith("get")) throw new IntrospectionException("mixed use of get/is for attribute " + key); getters.put(key, method);
} catch (IntrospectionException e) { System.err.println("Failed to get the info due to an exception: "); e.printStackTrace(); System.exit(1); } catch (ReflectionException e) {
throw new MBeanProxyCreationException(e.toString());
Method setter = setters.get(key); if (setter != null && setter.getParameterTypes()[0].equals(signature[0]) == false) throw new IntrospectionException("overloaded type for attribute set: " + key); setters.put(key, methods[i]); Method getter = getters.get(key); if (getter != null && getter.getName().startsWith("is")) throw new IntrospectionException("mixed use of get/is for attribute " + key); getters.put(key, methods[i]); if (getter != null && getter.getName().startsWith("get")) throw new IntrospectionException("mixed use of get/is for attribute " + key); throw new NotCompliantMBeanException(e.getMessage());
public PlainMBeanMirror(MBeanServerConnection mbsc, ObjectName objectName, ObjectName localObjectName) throws IOException, InstanceNotFoundException, IntrospectionException { this.mbsc = mbsc; this.objectName = objectName; this.localObjectName = localObjectName; MBeanInfo beanInfo = null; try { // Don't save the mbean info for dynamic mbeans, it can change during execution if (!mbsc.isInstanceOf(objectName, DynamicMBean.class.getName())) { beanInfo = mbsc.getMBeanInfo(objectName); } } catch (ReflectionException e) { // Callers cannot possibly care about the difference between // IntrospectionException and ReflectionException IntrospectionException ie = new IntrospectionException(e.getMessage()); ie.initCause(e); throw ie; } mBeanInfo = beanInfo; }
Method setter = setters.get(key); if (setter != null && setter.getGenericParameterTypes()[0].equals(signature[0]) == false) throw new IntrospectionException("overloaded type for attribute set: " + key); setters.put(key, method); Method getter = getters.get(key); if (getter != null && getter.getName().startsWith("is")) throw new IntrospectionException("mixed use of get/is for attribute " + key); getters.put(key, method); Method getter = getters.get(key); if (getter != null && getter.getName().startsWith("get")) throw new IntrospectionException("mixed use of get/is for attribute " + key); getters.put(key, method);
public MBeanProperty(BeanProperty beanProperty, String exportName, String description, Access access) { this.beanProperty = beanProperty; try { this.attributeInfo = new ModelMBeanAttributeInfo( exportName, description, access == Access.RO || access == Access.RW ? beanProperty.getReadMethod() : null, access == Access.WO || access == Access.RW ? beanProperty.getWriteMethod() : null); } catch (IntrospectionException e) { throw new IllegalArgumentException("Error creating property from " + beanProperty + ": " + e.getMessage(), e); } }
e.printStackTrace(System.err); } catch (IntrospectionException e) { e.printStackTrace(System.err); } catch (ReflectionException e) { e.printStackTrace(System.err);
if (getter == null) throw new IntrospectionException("no getter method found for attribute: " + attribute.getName()); if (getter == null) throw new IntrospectionException("no getter method found for attribute: " + attribute.getName()); if (setter == null) throw new IntrospectionException("no setter method found for attribute: " + attribute.getName()); if (setter == null) throw new IntrospectionException("no setter method found for attribute: " + attribute.getName()); if (method == null) throw new IntrospectionException("no method found for operation: " + operation.getName()); // FIXME better error!
throw new NotCompliantMBeanException( e.getMessage() );
if (getter == null) throw new IntrospectionException("no getter method found for attribute: " + attribute.getName()); if (getter == null) throw new IntrospectionException("no getter method found for attribute: " + attribute.getName()); if (setter == null) throw new IntrospectionException("no setter method found for attribute: " + attribute.getName()); if (setter == null) throw new IntrospectionException("no setter method found for attribute: " + attribute.getName()); if (method == null) throw new IntrospectionException("no method found for operation: " + operation.getName()); // FIXME better error!