Code example for Constructor

Methods: getGenericParameterTypes

0
                    ((mod & Modifier.PUBLIC) == Modifier.PUBLIC)
                            && ((mod & Modifier.PRIVATE) == 0));
        } catch (NoSuchMethodException e) {
            fail("Exception during test : " + e.getMessage());
        } 
        try { 
            Class[] cl = { int.class };
            Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass()
                    .getDeclaredConstructor(cl);
            mod = ctor.getModifiers();
            assertTrue("Returned incorrect modifers for private ctor",
                    ((mod & Modifier.PRIVATE) == Modifier.PRIVATE)
                            && ((mod & Modifier.PUBLIC) == 0));
        } catch (NoSuchMethodException e) {
            fail("Exception during test : " + e.getMessage());
        } 
        try { 
            Class[] cl = { long.class };
            Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass()
                    .getDeclaredConstructor(cl);
            mod = ctor.getModifiers();