bundles/org.apache.jasper.glassfish/src/org/apache/jasper/runtime/ProtectedFunctionMapper.java
public static ProtectedFunctionMapper getMapForFunction(
		String fnQName, final Class<?> c,
                final String methodName, final Class<?>[] args )
    {
        java.lang.reflect.Method method;
        ProtectedFunctionMapper funcMapper;
        if (SecurityUtil.isPackageProtectionEnabled()){
            funcMapper = AccessController.doPrivileged(
                new PrivilegedAction<ProtectedFunctionMapper>(){
                public ProtectedFunctionMapper run() {
                    return new ProtectedFunctionMapper();
                }
            });

            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 {
	    funcMapper = new ProtectedFunctionMapper();
             try {
                method = c.getDeclaredMethod(methodName, args);
            } catch( NoSuchMethodException e ) {
                throw new RuntimeException(
                    "Invalid function mapping - no such method: "
                    + e.getMessage());
            }
        }
        funcMapper.theMethod = method;
	return funcMapper;
    }
public static ProtectedFunctionMapper getMapForFunction(
		String fnQName, final Class<?> c,
                final String methodName, final Class<?>[] args )
    {
        java.lang.reflect.Method method;
        ProtectedFunctionMapper funcMapper;
        if (SecurityUtil.isPackageProtectionEnabled()){
            funcMapper = AccessController.doPrivileged(
                new PrivilegedAction<ProtectedFunctionMapper>(){
                public ProtectedFunctionMapper run() {
                    return new ProtectedFunctionMapper();
                }
            });

            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 {
	    funcMapper = new ProtectedFunctionMapper();
             try {
                method = c.getDeclaredMethod(methodName, args);
            } catch( NoSuchMethodException e ) {
                throw new RuntimeException(
                    "Invalid function mapping - no such method: "
                    + e.getMessage());
            }
        }
        funcMapper.theMethod = method;
	return funcMapper;
    }
public static ProtectedFunctionMapper getMapForFunction ( String fnQName , final Class < ? > c , final String methodName , final Class < ? > [ ] args ) { java . lang . reflect . Method method ; ProtectedFunctionMapper funcMapper ; if ( SecurityUtil . isPackageProtectionEnabled ( ) ) { funcMapper = AccessController . doPrivileged ( new PrivilegedAction < ProtectedFunctionMapper > ( ) { public ProtectedFunctionMapper run ( ) { return new ProtectedFunctionMapper ( ) ; } } ) ; 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 { funcMapper = new ProtectedFunctionMapper ( ) ; try { method = c . getDeclaredMethod ( methodName , args ) ; } catch ( NoSuchMethodException e ) { throw new RuntimeException ( "Invalid function mapping - no such method: " + e . getMessage ( ) ) ; } } funcMapper . theMethod = method ; return funcMapper ; }
Creates an instance for this class, and stores the Method for
the given EL function prefix and name. This method is used for
the case when there is only one function in the EL expression.

@param fnQName The EL function qualified name (including prefix)
@param c The class containing the Java method
@param methodName The name of the Java method
@param args The arguments of the Java method
@throws RuntimeException if no method with the given signature
could be found.
Creates an instance for this class and stores the Method for the given EL function prefix and name . This method is used for the case when there is only one function in the EL expression .