long.class : Long « java.lang « Java by API






long.class

   

import java.lang.reflect.Method;

/**
 * Demonstrates how to get specific method information.
 * 
 * @author <a href=mailto:kraythe@arcor.de>Robert Simmons jr. (kraythe)</a>
 * @version $Revision: 1.3 $
 */
public class SpecificMethodInfoDemo {
  public static void main(final String[] args) {
    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());
  }
}

/* ########## End of File ########## */

           
         
    
    
  








Related examples in the same category

1.Long.MAX_VALUE
2.Long.MIN_VALUE
3.new Long(String s)
4.new Long(long value)
5.Long: byteValue()
6.Long: doubleValue()
7.Long: floatValue()
8.Long: intValue()
9.Long: longValue()
10.Long: parseLong(String s, int radix)
11.Long: shortValue()
12.Long: toHexString(long i)
13.Long: toString(long i, int radix)
14.Long: valueOf(String stringValue)