Code example for Method

Methods: getModifiers, getReturnType

0
    public final void checkTranslateWithErrorExecutionPointcutDefinition() throws NoSuchMethodException { 
        Class<?> clazz = TranslationServiceImpl.class;
        assertEquals("com.qcadoo.localization.internal.TranslationServiceImpl", clazz.getCanonicalName());
        final Method method = clazz.getDeclaredMethod("translateWithError", String.class, Locale.class, String[].class);
        assertNotNull(method);
        assertTrue(Modifier.isPrivate(method.getModifiers()));
        assertEquals(String.class, method.getReturnType());
    } 
 
}