public void mapFunction ( String fnQName , final Class < ? > c , final String methodName , final Class < ? > [ ] args ) { java . lang . reflect . Method method ; if ( SecurityUtil . isPackageProtectionEnabled ( ) ) { try { method = AccessController . doPrivileged ( new PrivilegedExceptionAction < Method > ( ) { public Method run ( ) throws Exception { return c . getDeclaredMethod ( methodName , args ) ; } } ) ; } catch ( PrivilegedActionException ex ) { throw new RuntimeException ( "Invalid function mapping - no such method: " + ex . getException ( ) . getMessage ( ) ) ; } } else { try { method = c . getDeclaredMethod ( methodName , args ) ; } catch ( NoSuchMethodException e ) { throw new RuntimeException ( "Invalid function mapping - no such method: " + e . getMessage ( ) ) ; } } this . fnmap . put ( fnQName , method ) ; }
Stores a mapping from the given EL function prefix and name to the given Java method .