private InterceptorProxy[] getInterceptorProxies(InterceptorMethodKind kind, List<String> orderedList) // d630717
    throws EJBConfigurationException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
        {
            Tr.entry(tc, "getInterceptorProxies: " + kind + ", " + orderedList);
        }

        List<InterceptorProxy> proxyList = new ArrayList<InterceptorProxy>();

        // Iterate over the ordered list of interceptor classes.  For each
        // interceptor, get the list of interceptor proxies of the appropriate
        // interceptor kind, and add the proxies to the list.
        for (String name : orderedList)
        {
            // Every class should have been loaded by this point.  We make this
            // a requirement because it's more efficient than going to the class
            // loader and because it's trivial to ensure.
            Class<?> klass = ivInterceptorNameToClassMap.get(name);

            Map<InterceptorMethodKind, List<InterceptorProxy>> proxyMap = ivInterceptorProxyMaps.get(klass);
            if (proxyMap == null)
            {
                // The proxies for this interceptor have not been created yet.  Add
                // the class to the list of interceptor proxy classes, and then
                // create the map using that array index.
                int index = ivInterceptorClasses.size();
                ivInterceptorClasses.add(klass);

                proxyMap = createInterceptorProxyMap(klass, index);
                ivInterceptorProxyMaps.put(klass, proxyMap);
            }

            List<InterceptorProxy> kindProxyList = proxyMap.get(kind);
            if (kindProxyList != null)
            {
                proxyList.addAll(kindProxyList);
            }
        }

        // If CDI is enabled, add the proxies from the first JCDI interceptor
        // class. It should run before all other interceptors.          F743-29169
        if (ivJCDIFirstInterceptorClass != null)
        {
            Map<InterceptorMethodKind, List<InterceptorProxy>> proxyMap = ivInterceptorProxyMaps.get(ivJCDIFirstInterceptorClass);
            if (proxyMap == null)
            {
                // The proxies for this interceptor have not been created yet.  Add
                // the class to the list of interceptor proxy classes, and then
                // create the map using that array index.
                int index = ivInterceptorClasses.size();
                ivInterceptorClasses.add(ivJCDIFirstInterceptorClass);

                proxyMap = createInterceptorProxyMap(ivJCDIFirstInterceptorClass, index);
                ivInterceptorProxyMaps.put(ivJCDIFirstInterceptorClass, proxyMap);
            }

            List<InterceptorProxy> kindProxyList = proxyMap.get(kind);
            if (kindProxyList != null)
            {
                proxyList.addAll(0, kindProxyList); // adds to beginning
            }
        }

        // If CDI is enabled, add the proxies from the last JCDI interceptor
        // class. It should run after all other interceptors.           F743-15628
        if (ivJCDILastInterceptorClass != null)
        {
            Map<InterceptorMethodKind, List<InterceptorProxy>> proxyMap = ivInterceptorProxyMaps.get(ivJCDILastInterceptorClass);
            if (proxyMap == null)
            {
                // The proxies for this interceptor have not been created yet.  Add
                // the class to the list of interceptor proxy classes, and then
                // create the map using that array index.
                int index = ivInterceptorClasses.size();
                ivInterceptorClasses.add(ivJCDILastInterceptorClass);

                proxyMap = createInterceptorProxyMap(ivJCDILastInterceptorClass, index);
                ivInterceptorProxyMaps.put(ivJCDILastInterceptorClass, proxyMap);
            }

            List<InterceptorProxy> kindProxyList = proxyMap.get(kind);
            if (kindProxyList != null)
            {
                proxyList.addAll(kindProxyList); // adds to end
            }
        }

        // Finally, add the interceptor proxies from the bean class.
        List<InterceptorProxy> kindProxyList = ivBeanInterceptorProxyMap.get(kind);
        if (kindProxyList != null)
        {
            proxyList.addAll(kindProxyList);
        }

        // Convert the list of proxies to an array.
        InterceptorProxy[] proxies;
        if (proxyList.isEmpty())
        {
            proxies = null;
        }
        else
        {
            proxies = new InterceptorProxy[proxyList.size()];
            proxyList.toArray(proxies);
        }

        if (isTraceOn && tc.isEntryEnabled())
        {
            Tr.exit(tc, "getInterceptorProxies: " + Arrays.toString(proxies));
        }
        return proxies;
    }
private InterceptorProxy [ ] getInterceptorProxies ( InterceptorMethodKind kind , List < String > orderedList ) throws EJBConfigurationException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getInterceptorProxies: " + kind + ", " + orderedList ) ; } List < InterceptorProxy > proxyList = new ArrayList < InterceptorProxy > ( ) ; for ( String name : orderedList ) { Class < ? > klass = ivInterceptorNameToClassMap . get ( name ) ; Map < InterceptorMethodKind , List < InterceptorProxy > > proxyMap = ivInterceptorProxyMaps . get ( klass ) ; if ( proxyMap == null ) { int index = ivInterceptorClasses . size ( ) ; ivInterceptorClasses . add ( klass ) ; proxyMap = createInterceptorProxyMap ( klass , index ) ; ivInterceptorProxyMaps . put ( klass , proxyMap ) ; } List < InterceptorProxy > kindProxyList = proxyMap . get ( kind ) ; if ( kindProxyList != null ) { proxyList . addAll ( kindProxyList ) ; } } if ( ivJCDIFirstInterceptorClass != null ) { Map < InterceptorMethodKind , List < InterceptorProxy > > proxyMap = ivInterceptorProxyMaps . get ( ivJCDIFirstInterceptorClass ) ; if ( proxyMap == null ) { int index = ivInterceptorClasses . size ( ) ; ivInterceptorClasses . add ( ivJCDIFirstInterceptorClass ) ; proxyMap = createInterceptorProxyMap ( ivJCDIFirstInterceptorClass , index ) ; ivInterceptorProxyMaps . put ( ivJCDIFirstInterceptorClass , proxyMap ) ; } List < InterceptorProxy > kindProxyList = proxyMap . get ( kind ) ; if ( kindProxyList != null ) { proxyList . addAll ( 0 , kindProxyList ) ; } } if ( ivJCDILastInterceptorClass != null ) { Map < InterceptorMethodKind , List < InterceptorProxy > > proxyMap = ivInterceptorProxyMaps . get ( ivJCDILastInterceptorClass ) ; if ( proxyMap == null ) { int index = ivInterceptorClasses . size ( ) ; ivInterceptorClasses . add ( ivJCDILastInterceptorClass ) ; proxyMap = createInterceptorProxyMap ( ivJCDILastInterceptorClass , index ) ; ivInterceptorProxyMaps . put ( ivJCDILastInterceptorClass , proxyMap ) ; } List < InterceptorProxy > kindProxyList = proxyMap . get ( kind ) ; if ( kindProxyList != null ) { proxyList . addAll ( kindProxyList ) ; } } List < InterceptorProxy > kindProxyList = ivBeanInterceptorProxyMap . get ( kind ) ; if ( kindProxyList != null ) { proxyList . addAll ( kindProxyList ) ; } InterceptorProxy [ ] proxies ; if ( proxyList . isEmpty ( ) ) { proxies = null ; } else { proxies = new InterceptorProxy [ proxyList . size ( ) ] ; proxyList . toArray ( proxies ) ; } if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getInterceptorProxies: " + Arrays . toString ( proxies ) ) ; } return proxies ; }
Gets an ordered list of interceptor proxies of the specified kind.
processBeanInterceptors must have been called prior to calling this
method.

@param kind the interceptor kind
@param orderedList an ordered list of interceptor class names, all of
which have been passed through loadInterceptorClass or
addLoadedInterceptorClass
@return an ordered list of interceptor proxies, or null if neither the
bean class nor the ordered list of interceptor classes has any
interceptors of the specified kind
@throws EJBConfigurationException