diff options
| author | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-28 13:29:13 +0000 |
|---|---|---|
| committer | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-28 13:29:13 +0000 |
| commit | 1020ce5944edde4364baef4d371cd4f9b0dae721 (patch) | |
| tree | 602cd7aa7c947386134690d8e0f6b53abcdeacb9 /libjava/classpath/gnu/java/lang/management | |
| parent | 9f41ce98ce6f4f7c8ac5e2c4b6e5d27e10201015 (diff) | |
| download | ppe42-gcc-1020ce5944edde4364baef4d371cd4f9b0dae721.tar.gz ppe42-gcc-1020ce5944edde4364baef4d371cd4f9b0dae721.zip | |
libjava/
2008-06-28 Matthias Klose <doko@ubuntu.com>
Import GNU Classpath (classpath-0_97_2-release).
* Regenerate class and header files.
* Regenerate auto* files.
* gcj/javaprims.h: Define jobjectRefType.
* jni.cc (_Jv_JNI_GetObjectRefType): New (stub only).
(_Jv_JNIFunctions): Initialize GetObjectRefType.
* gnu/classpath/jdwp/VMVirtualMachine.java,
java/security/VMSecureRandom.java: Merge from classpath.
* HACKING: Fix typo.
* ChangeLog-2007: New file.
* configure.ac: Set JAVAC, pass --disable-regen-headers to classpath.
libjava/classpath/
2008-06-28 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_javac.m4: Disable check for JAVAC, when
not configured with --enable-java-maintainer-mode.
* aclocal.m4, configure: Regenerate.
* native/jni/gstreamer-peer/Makefile.am: Do not link with
libclasspathnative.
* native/jni/gstreamer-peer/Makefile.in: Regenerate.
* tools/Makefile.am, lib/Makefile.am: Use JAVAC for setting
JCOMPILER, drop flags not understood by gcj.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137223 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/java/lang/management')
| -rw-r--r-- | libjava/classpath/gnu/java/lang/management/BeanImpl.java | 93 |
1 files changed, 86 insertions, 7 deletions
diff --git a/libjava/classpath/gnu/java/lang/management/BeanImpl.java b/libjava/classpath/gnu/java/lang/management/BeanImpl.java index 59e79a550d3..a651e3548b4 100644 --- a/libjava/classpath/gnu/java/lang/management/BeanImpl.java +++ b/libjava/classpath/gnu/java/lang/management/BeanImpl.java @@ -44,8 +44,6 @@ import java.lang.management.ManagementPermission; import java.lang.reflect.Array; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.TypeVariable; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -59,13 +57,11 @@ import javax.management.MBeanException; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; import javax.management.MBeanParameterInfo; -import javax.management.MBeanInfo; import javax.management.NotCompliantMBeanException; import javax.management.ReflectionException; import javax.management.StandardMBean; import javax.management.openmbean.ArrayType; -import javax.management.openmbean.CompositeData; import javax.management.openmbean.CompositeDataSupport; import javax.management.openmbean.CompositeType; import javax.management.openmbean.OpenDataException; @@ -80,7 +76,6 @@ import javax.management.openmbean.OpenMBeanOperationInfoSupport; import javax.management.openmbean.OpenMBeanParameterInfo; import javax.management.openmbean.OpenMBeanParameterInfoSupport; import javax.management.openmbean.OpenType; -import javax.management.openmbean.SimpleType; import javax.management.openmbean.TabularData; import javax.management.openmbean.TabularDataSupport; import javax.management.openmbean.TabularType; @@ -277,7 +272,7 @@ public class BeanImpl Method getter = null; try { - getter = vClass.getMethod("get" + field, null); + getter = vClass.getMethod("get" + field); } catch (NoSuchMethodException e) { @@ -285,7 +280,7 @@ public class BeanImpl } try { - values.add(getter.invoke(value, null)); + values.add(getter.invoke(value)); } catch (IllegalAccessException e) { @@ -323,6 +318,90 @@ public class BeanImpl return (MBeanInfo) openInfo; } + /** + * Override this method so as to prevent the description of a constructor's + * parameter being @code{null}. Open MBeans can not have @code{null} descriptions, + * but one will occur as the names of parameters aren't stored for reflection. + * + * @param constructor the constructor whose parameter needs describing. + * @param parameter the parameter to be described. + * @param sequenceNo the number of the parameter to describe. + * @return a description of the constructor's parameter. + */ + protected String getDescription(MBeanConstructorInfo constructor, + MBeanParameterInfo parameter, + int sequenceNo) + { + String desc = parameter.getDescription(); + if (desc == null) + return "param" + sequenceNo; + else + return desc; + } + + /** + * Override this method so as to prevent the description of an operation's + * parameter being @code{null}. Open MBeans can not have @code{null} descriptions, + * but one will occur as the names of parameters aren't stored for reflection. + * + * @param operation the operation whose parameter needs describing. + * @param parameter the parameter to be described. + * @param sequenceNo the number of the parameter to describe. + * @return a description of the operation's parameter. + */ + protected String getDescription(MBeanOperationInfo operation, + MBeanParameterInfo parameter, + int sequenceNo) + { + String desc = parameter.getDescription(); + if (desc == null) + return "param" + sequenceNo; + else + return desc; + } + + /** + * Override this method so as to prevent the name of a constructor's + * parameter being @code{null}. Open MBeans can not have @code{null} names, + * but one will occur as the names of parameters aren't stored for reflection. + * + * @param constructor the constructor whose parameter needs a name. + * @param parameter the parameter to be named. + * @param sequenceNo the number of the parameter to name. + * @return a description of the constructor's parameter. + */ + protected String getParameterName(MBeanConstructorInfo constructor, + MBeanParameterInfo parameter, + int sequenceNo) + { + String name = parameter.getName(); + if (name == null) + return "param" + sequenceNo; + else + return name; + } + + /** + * Override this method so as to prevent the name of an operation's + * parameter being @code{null}. Open MBeans can not have @code{null} names, + * but one will occur as the names of parameters aren't stored for reflection. + * + * @param operation the operation whose parameter needs a name. + * @param parameter the parameter to be named. + * @param sequenceNo the number of the parameter to name. + * @return a description of the operation's parameter. + */ + protected String getParameterName(MBeanOperationInfo operation, + MBeanParameterInfo parameter, + int sequenceNo) + { + String name = parameter.getName(); + if (name == null) + return "param" + sequenceNo; + else + return name; + } + public MBeanInfo getMBeanInfo() { super.getMBeanInfo(); |

