Methods Summary |
---|
void | checkCallFromOpen()
try {
for (OpenConverter paramConverter : paramConverters)
paramConverter.checkReconstructible();
} catch (InvalidObjectException e) {
throw new IllegalArgumentException(e);
}
|
void | checkCallToOpen()
try {
returnConverter.checkReconstructible();
} catch (InvalidObjectException e) {
throw new IllegalArgumentException(e);
}
|
static com.sun.jmx.mbeanserver.ConvertingMethod | from(java.lang.reflect.Method m)
try {
return new ConvertingMethod(m);
} catch (OpenDataException ode) {
final String msg = "Method " + m.getDeclaringClass().getName() +
"." + m.getName() + " has parameter or return type that " +
"cannot be translated into an open type";
throw new IllegalArgumentException(msg, ode);
}
|
final java.lang.Object | fromOpenParameter(com.sun.jmx.mbeanserver.MXBeanLookup lookup, java.lang.Object param, int paramNo)
return paramConverters[paramNo].fromOpenValue(lookup, param);
|
final java.lang.Object[] | fromOpenParameters(com.sun.jmx.mbeanserver.MXBeanLookup lookup, java.lang.Object[] params)
if (paramConversionIsIdentity || params == null)
return params;
final Object[] jparams = new Object[params.length];
for (int i = 0; i < params.length; i++)
jparams[i] = paramConverters[i].fromOpenValue(lookup, params[i]);
return jparams;
|
final java.lang.Object | fromOpenReturnValue(com.sun.jmx.mbeanserver.MXBeanLookup lookup, java.lang.Object ret)
return returnConverter.fromOpenValue(lookup, ret);
|
javax.management.Descriptor | getDescriptor()
return Introspector.descriptorForElement(method);
|
java.lang.reflect.Type[] | getGenericParameterTypes()
return method.getGenericParameterTypes();
|
java.lang.reflect.Type | getGenericReturnType()
return method.getGenericReturnType();
|
java.lang.reflect.Method | getMethod()
return method;
|
java.lang.String | getName()
return method.getName();
|
javax.management.openmbean.OpenType[] | getOpenParameterTypes()
final OpenType[] types = new OpenType[paramConverters.length];
for (int i = 0; i < paramConverters.length; i++)
types[i] = paramConverters[i].getOpenType();
return types;
|
javax.management.openmbean.OpenType | getOpenReturnType()
return returnConverter.getOpenType();
|
java.lang.String[] | getOpenSignature()
if (paramConverters.length == 0)
return noStrings;
String[] sig = new String[paramConverters.length];
for (int i = 0; i < paramConverters.length; i++)
sig[i] = paramConverters[i].getOpenClass().getName();
return sig;
|
java.lang.Object | invokeWithOpenReturn(com.sun.jmx.mbeanserver.MXBeanLookup lookup, java.lang.Object obj, java.lang.Object[] params)
final Object[] javaParams;
try {
javaParams = fromOpenParameters(lookup, params);
} catch (InvalidObjectException e) {
// probably can't happen
final String msg = methodName() + ": cannot convert parameters " +
"from open values: " + e;
throw new MBeanException(e, msg);
}
final Object javaReturn = method.invoke(obj, javaParams);
try {
return returnConverter.toOpenValue(lookup, javaReturn);
} catch (OpenDataException e) {
// probably can't happen
final String msg = methodName() + ": cannot convert return " +
"value to open value: " + e;
throw new MBeanException(e, msg);
}
|
private java.lang.String | methodName()
return method.getDeclaringClass() + "." + method.getName();
|
final java.lang.Object | toOpenParameter(com.sun.jmx.mbeanserver.MXBeanLookup lookup, java.lang.Object param, int paramNo)
return paramConverters[paramNo].toOpenValue(lookup, param);
|
final java.lang.Object[] | toOpenParameters(com.sun.jmx.mbeanserver.MXBeanLookup lookup, java.lang.Object[] params)
if (paramConversionIsIdentity || params == null)
return params;
final Object[] oparams = new Object[params.length];
for (int i = 0; i < params.length; i++)
oparams[i] = paramConverters[i].toOpenValue(lookup, params[i]);
return oparams;
|
final java.lang.Object | toOpenReturnValue(com.sun.jmx.mbeanserver.MXBeanLookup lookup, java.lang.Object ret)
return returnConverter.toOpenValue(lookup, ret);
|