/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
final class ConvertingMethod {
try {
return new ConvertingMethod(m);
} catch (OpenDataException ode) {
"cannot be translated into an open type";
}
}
return method;
}
}
return method.getGenericReturnType();
}
return method.getGenericParameterTypes();
}
}
return returnMapping.getOpenType();
}
return types;
}
/* Check that this method will be callable when we are going from
* open types to Java types, for example when we are going from
* an MXBean wrapper to the underlying resource.
* The parameters will be converted to
* Java types, so they must be "reconstructible". The return
* value will be converted to an Open Type, so if it is convertible
* at all there is no further check needed.
*/
void checkCallFromOpen() {
try {
} catch (InvalidObjectException e) {
throw new IllegalArgumentException(e);
}
}
/* Check that this method will be callable when we are going from
* Java types to open types, for example when we are going from
* an MXBean proxy to the open types that it will be mapped to.
* The return type will be converted back to a Java type, so it
* must be "reconstructible". The parameters will be converted to
* open types, so if it is convertible at all there is no further
* check needed.
*/
void checkCallToOpen() {
try {
} catch (InvalidObjectException e) {
throw new IllegalArgumentException(e);
}
}
return noStrings;
return sig;
}
throws OpenDataException {
}
throws InvalidObjectException {
}
throws OpenDataException {
return params;
return oparams;
}
throws InvalidObjectException {
return params;
return jparams;
}
int paramNo)
throws OpenDataException {
}
int paramNo)
throws InvalidObjectException {
}
throws MBeanException, IllegalAccessException,
try {
} finally {
}
}
throws MBeanException, IllegalAccessException,
final Object[] javaParams;
try {
} catch (InvalidObjectException e) {
// probably can't happen
"from open values: " + e;
throw new MBeanException(e, msg);
}
try {
} catch (OpenDataException e) {
// probably can't happen
"value to open value: " + e;
throw new MBeanException(e, msg);
}
}
}
this.method = m;
boolean identity = true;
}
}
private final boolean paramConversionIsIdentity;
}