Code example for Constructor

Methods: getName

0
     */ 
    public void test_getName() throws Exception { 
        Constructor ctor = new ConstructorTestHelper().getClass()
                .getConstructor(new Class[0]);
        assertTrue(
                "Returned incorrect name: " + ctor.getName(),
                ctor
                        .getName()
                        .equals(
                                "org.apache.harmony.luni.tests.java.lang.reflect.ConstructorTest$ConstructorTestHelper")); 
    } 
 
    /** 
     * @tests java.lang.reflect.Constructor#getParameterTypes() 
     */ 
    public void test_getParameterTypes() throws Exception { 
        Class[] types = null;
        Constructor ctor = new ConstructorTestHelper().getClass()
                .getConstructor(new Class[0]);
        types = ctor.getParameterTypes();