Demo method.
final Method byteValueMeth;
final Method waitMeth;
final Method waitDetailMeth;
try {
byteValueMeth = Number.class.getMethod("byteValue", null);
waitMeth = Number.class.getMethod("wait", new Class[] { });
waitDetailMeth =
Number.class.getMethod("wait", new Class[] { long.class, int.class });
} catch (final NoSuchMethodException ex) {
throw new RuntimeException(ex);
}
System.out.println("byteValueMeth = " + byteValueMeth.toString());
System.out.println("waitMeth = " + waitMeth.toString());
System.out.println("waitDetailMeth = " + waitDetailMeth.toString());