{@inheritdoc}

@throws InjectionException
321608
public function createInjection(\ReflectionClass $class, string $context = null)
    {
        if ($class->isSubclassOf(ClassesInterface::class)) {
            return $this->classLocator();
        } elseif ($class->isSubclassOf(InvocationsInterface::class)) {
            return $this->invocationLocator();
        }

        throw new InjectionException("Unable to create injection for {$class}");
    }
487969
@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
		
		super.onViewCreated(view, savedInstanceState);
		InjectionUtils.inject(INJECTOR_CONFIGURATION);
	}
1136010
@Override
    public InjectionTarget[] getInjectionTargets(final Class<?> classToInjectInto) throws InjectionException {
        // This method attempts to cache the InjectTargets that are associated
        // with the specified class, so that if this method is invoked again and
        // the same class is specified, we can just grab the list from the Map
        // and not re-calculate it.
        //
        // EJB container should not need this caching, because it caches the list
        // of InjectionTargets in BeanMetaData and InterceptorMetaData.
        //
        // However, WebContainer will use this caching.  Under most circumstances,
        // they only inject into a class once...but I WebContainer team lead says
        // its possible to have multiple servlets share the same class, and in that
        // scenario they would be injecting into the same class multiple times,
        // and take advantage of the caching.

        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isDebugEnabled())
            Tr.entry(tc, "getInjectionTargets: " + classToInjectInto + ", " + this);

        InjectionTarget[] injectionTargetsForClass = ivInjectionTargetMap.get(classToInjectInto);
        if (injectionTargetsForClass == null) {
            synchronized (ivInjectionTargetMap) {
                injectionTargetsForClass = ivInjectionTargetMap.get(classToInjectInto);
                if (injectionTargetsForClass == null) {
                    // If targets were not found in cache from app start, then rebuilding them
                    // needs to run privileged, as this may run in the context of tha appliation
                    try {
                        injectionTargetsForClass = AccessController.doPrivileged(new PrivilegedExceptionAction<InjectionTarget[]>() {
                            @Override
                            public InjectionTarget[] run() throws Exception {
                                return ivInjectionEngine.getInjectionTargets(ivDeclaredInjectionTargets, classToInjectInto, ivCheckAppConfig);
                            }
                        });
                    } catch (PrivilegedActionException ex) {
                        Throwable cause = ex.getCause();
                        if (cause instanceof InjectionException) {
                            throw (InjectionException) cause;
                        }
                        if (cause instanceof RuntimeException) {
                            throw (RuntimeException) cause;
                        }
                        throw new InjectionException(cause);
                    }
                    if (ivInjectionTargetMap.size() <= svInjTarMapCacheSize || injectionTargetsForClass.length > 0) {
                        ivInjectionTargetMap.put(classToInjectInto, injectionTargetsForClass);
                    }
                }
            }
        }

        if (isTraceOn && tc.isDebugEnabled())
            Tr.exit(tc, "getInjectionTargets", Arrays.asList(injectionTargetsForClass));
        return injectionTargetsForClass;
    }
1158676
protected function createObjectUsingFactory(Binding $binding, InjectionPointInterface $point = NULL)
	{
		$callback = $binding->getTarget();
		
		if(is_array($callback))
		{
			$callback = [$this->get($callback[0]), $callback[1]];
			$ref = new \ReflectionMethod(get_class($callback[0]), $callback[1]);
		}
		else
		{
			$ref = new \ReflectionFunction($callback);
		}
		
		$resolvers = (array)$binding->getResolvers();
		
		// Special case: inject config of the type to be created into the factory:
		foreach($ref->getParameters() as $param)
		{
			if($this->getParamType($param) === Configuration::class)
			{
				$resolvers[$param->name] = $this->config->getConfig(str_replace('\\', '.', $binding->getTypeName()));
			}
		}
		
		$args = $this->populateArguments($ref, 0, $resolvers, $point);
			
		switch(count($args))
		{
			case 0:
				$object = $callback();
				break;
			case 1:
				$object = $callback($args[0]);
				break;
			case 2:
				$object = $callback($args[0], $args[1]);
				break;
			case 3:
				$object = $callback($args[0], $args[1], $args[2]);
				break;
			case 4:
				$object = $callback($args[0], $args[1], $args[2], $args[3]);
				break;
			default:
				$object = call_user_func_array($callback, $args);
		}
		
		if($object instanceof ScopedProxyInterface)
		{
			return $object;
		}
		
		$object = $this->initialize($object);
		
		foreach($binding->getMarkers(SetterInjection::class) as $setter)
		{
			$this->performSetterInjection($object, $setter);
		}
		
		$initializers = $binding->getInitializers();
		
		if(!empty($initializers))
		{
			$object = $this->invokeBindingInitializers($binding->getTypeName(), $object, $initializers);
		}
			
		return $object;
	}
621432
function resolveInjects(obj, override){
    var injects = obj.$inject || override;

    if (exists(injects)) {
      if (!Array.isArray(injects)) {
        injects = [injects];
      }
      injects.forEach(function addInjects(element) {
        addInject(obj, element);
      });
    }
  }
803479
@Override
    public ReferenceContext initializeInjectionServices() throws CDIException {
        Set<Class<?>> injectionClasses = getInjectionClasses();
        ReferenceContext referenceContext = archive.getReferenceContext(injectionClasses);

        return referenceContext;
    }
187964
@Override
    public void registerInjectionTargetListener(WebSphereInjectionTargetListener<?> listener) {
        Object instance = listener.getObject();
        injectionTargetListeners.put(instance, listener);
    }
1337994
@Override
    public final InjectionBinding<A> createInjectionBinding(A annotation,
                                                            Class<?> instanceClass,
                                                            Member member,
                                                            String jndiName)
                    throws InjectionException
    {
        return createInjectionBinding(annotation, instanceClass, member);
    }
1100961
public static function injectQueryObject($objectName, $mock, $index = null)
    {
        self::injectObjectToArray(self::$injectedQueryObjects, $objectName, $mock, $index);
    }
716822
private function _applyInjections()
    {
        foreach ($this->injections as $head)
        {
            $tags = $this->_getInjectionString($head);

        }

        $this->template_markup = str_replace('</head>', $tags, $this->template_markup);
    }
1204650
public static function injectObject($objectName, $mock, $index = null)
    {
        self::injectObjectToArray(self::$injectedObjects, $objectName, $mock, $index);
    }
920040
public static function injectModel(&$model) {
        $actionResult = self::$viewContext->actionResult;

        if (!empty($actionResult)) {
            if ($actionResult instanceof ViewResult && !empty($actionResult->model)) {
                $model = $actionResult->model;
            }
            else {
                $model = null;
            }
        }
    }
1325430
@Override
    public void processXML() throws InjectionException {

        List<? extends JMSDestination> jmsDestinationDefinitions = ivNameSpaceConfig.getJNDIEnvironmentRefs(JMSDestination.class);

        if (jmsDestinationDefinitions != null) {
            for (JMSDestination jmsDestination : jmsDestinationDefinitions) {
                String jndiName = jmsDestination.getName();
                InjectionBinding<JMSDestinationDefinition> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                JMSDestinationDefinitionInjectionBinding binding;

                if (injectionBinding != null) {
                    binding = (JMSDestinationDefinitionInjectionBinding) injectionBinding;
                } else {
                    binding = new JMSDestinationDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
                    addInjectionBinding(binding);
                }

                binding.mergeXML(jmsDestination);
            }
        }

    }
1344540
public void setEnvEntryType(ResourceImpl annotation, Object type) // F743-32443
    throws InjectionException
    {
        if (type instanceof String)
        {
            setInjectionClassTypeName((String) type);
        }
        else
        {
            Class<?> classType = (Class<?>) type;
            annotation.ivType = classType;
            annotation.ivIsSetType = true;
            setInjectionClassType(classType);
        }
    }
1270808
@Override
	public void injectServices(ServiceRegistryImplementor serviceRegistry) {
		if ( gridDialect instanceof ServiceRegistryAwareService ) {
			( (ServiceRegistryAwareService) gridDialect ).injectServices( serviceRegistry );
		}
	}
874653
@SuppressWarnings("rawtypes")
    public void doPostConstruct(Class clazz, List<LifecycleCallback> postConstructs) throws InjectionException {
        mainClassName = clazz.getName();
        doPostConstruct(clazz, postConstructs, null);
    }
1027831
@Override
    public void processXML()
                    throws InjectionException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "processXML : " + this);

        List<? extends MailSession> mailSessionDefinitions = ivNameSpaceConfig.getJNDIEnvironmentRefs(MailSession.class);

        if (mailSessionDefinitions != null)
        {
            for (MailSession mailSession : mailSessionDefinitions)
            {
                String jndiName = mailSession.getName();
                InjectionBinding<MailSessionDefinition> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                MailSessionDefinitionInjectionBinding binding;

                if (injectionBinding != null)
                {
                    binding = (MailSessionDefinitionInjectionBinding) injectionBinding;
                }
                else
                {
                    binding = new MailSessionDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
                    addInjectionBinding(binding);
                }

                binding.mergeXML(mailSession);
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "processXML : " + this);

    }