FileDocCategorySizeDatePackage
ConstructorDemo.javaAPI DocExample1164Sun Dec 14 22:47:40 GMT 2003oreilly.hcj.reflection

ConstructorDemo

public class ConstructorDemo extends Object
Demonstrates use of Constructor objects.
author
Robert Simmons jr. (kraythe)
version
$Revision$

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)
Run the demo.

param
args Command line arguments.

		try {
			final Class[] ARG_TYPES = new Class[] { String.class };

			Constructor cst = Integer.class.getConstructor(ARG_TYPES);

			System.out.println(cst.newInstance(new Object[] { "45" }));
		} catch (final Exception ex) {
			ex.printStackTrace();
		}