public static InjectionTarget getInjectionTarget ( ComponentNameSpaceConfiguration compNSConfig , ClientInjection injection ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getInjectionTarget: " + injection ) ; // Create a temporary InjectionBinding in order to resolve the target. ClientInjectionBinding binding = new ClientInjectionBinding ( compNSConfig , injection ) ; Class < ? > injectionType = binding . loadClass ( injection . getInjectionTypeName ( ) ) ; String targetName = injection . getTargetName ( ) ; String targetClassName = injection . getTargetClassName ( ) ; // Add a single injection target and then retrieve it. binding . addInjectionTarget ( injectionType , targetName , targetClassName ) ; InjectionTarget target = InjectionProcessorContextImpl . getInjectionTargets ( binding ) . get ( 0 ) ; binding . metadataProcessingComplete ( ) ; // d681767 if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getInjectionTarget: " + target ) ; return target ; }
Acquires an InjectionTarget for the specified ClientInjection .