public void mapFunction ( String prefix , String fnName , final Class c , final String methodName , final Class [ ] args ) { //192474 start //We can get in to this method with null parameters if a JSP was compiled against the jsp-2.3 feature but running in a jsp-2.2 server. //This check is needed for the temporary JspClassInformation created in AbstractJSPExtensionServletWrapper class. if ( fnName == null ) { return ; } //192474 end java . lang . reflect . Method method ; if ( System . getSecurityManager ( ) != null ) { try { method = ( java . lang . reflect . Method ) AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object 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 ( prefix + ":" + fnName , method ) ; }
Stores a mapping from the given EL function prefix and name to the given Java method .