* @throws NoSuchMethodException
*/
static Method lookupMethod(Class<?> javaClass, String methodName, Class<?>[] parameterTypes) throws NoSuchMethodException {
if (System.getSecurityManager() != null) {
try {
return AccessController.doPrivileged(new MethodLookupAction(javaClass, methodName, parameterTypes));
} catch (PrivilegedActionException e) {
if (e.getCause() instanceof NoSuchMethodException) {
throw (NoSuchMethodException) e.getCause();
}
throw new WeldException(e.getCause());