private static void populateInterceptorMethodMap ( Class < ? > c , LinkedList < Class < ? > > lifoClasses , InterceptorMethodKind kind , Class < ? > [ ] parmTypes , List < ? extends InterceptorCallback > methodMetaDataList , Map < InterceptorMethodKind , List < Method > > methodMap // F743-17763 , boolean ejbClass , J2EEName name ) throws EJBConfigurationException { String className = c . getName ( ) ; List < Method > methodList = new LinkedList < Method > ( ) ; for ( InterceptorCallback methodMetaData : methodMetaDataList ) { // Get the method name and find the java reflection Method object // for this around-invoke method. String methodName = methodMetaData . getMethodName ( ) ; Method m = findMethod ( c , methodName , parmTypes ) ; if ( m == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , methodName + " not found in " + className + " or in any of it's super classes" ) ; } EJBConfigurationException ecex ; ecex = new EJBConfigurationException ( "CNTR0238E: " + methodName + " is not a " + kind . getXMLElementName ( ) + " method of EJB interceptor class " + className ) ; // CNTR0238E: The {2} interceptor class specifies the {1} method, which is // not an {0} method of this class. Tr . error ( tc , "INTERCEPTOR_METHOD_NOT_FOUND_CNTR0238E" , new Object [ ] { methodName , kind . getXMLElementName ( ) , className } ) ; throw ecex ; } if ( kind . isLifecycle ( ) ) { InterceptorMetaDataHelper . validateLifeCycleSignatureExceptParameters ( kind , kind . getXMLElementName ( ) , m , ejbClass , name ) ; } else { InterceptorMetaDataHelper . validateAroundSignature ( kind , m , name ) ; } // Add Method found to List of methods. methodList . add ( m ) ; } // Sort method list into a LIFO LinkedList where the most // generic super class method is first out and the interceptor // class method is last out. This is the invocation order // required by the EJB specification. LinkedList < Method > lifo = InterceptorMetaDataHelper . getLIFOMethodList ( methodList , lifoClasses ) ; methodMap . put ( kind , lifo ) ; }
Populate the interceptor map for an EJB or interceptor class . Each mapping value is a List of Methods ordered by class hierarchy with methods from java . lang . Object appearing first which is the order required by the EJB specification .