@ Override protected void processAnnotations ( Object instance ) throws IllegalAccessException , InvocationTargetException , NamingException { if ( context == null ) { // No resource injection return ; } checkAnnotation ( instance . getClass ( ) , instance ) ; /* * May be only check non private fields and methods * for @Resource (JSR 250), if used all superclasses MUST be examined * to discover all uses of this annotation. */ Class superclass = instance . getClass ( ) . getSuperclass ( ) ; while ( superclass != null && ( ! superclass . equals ( Object . class ) ) ) { checkAnnotation ( superclass , instance ) ; superclass = superclass . getSuperclass ( ) ; } }
Inject resources in specified instance .