Package com.google.inject.spi

Examples of com.google.inject.spi.InjectionPoint$Factory


    }

    private Iterator<Dependency<?>> initInjectionPoint()
    {
        try {
            InjectionPoint injectionPoint;
            if (creationTypeLiteral != null) {
                injectionPoint = InjectionPoint.forConstructorOf(creationTypeLiteral);
            }
            else {
                injectionPoint = InjectionPoint.forConstructorOf(creationClass);
            }

            return injectionPoint.getDependencies().iterator();
        }
        catch (ConfigurationException dummy) {
            // ignore
        }
View Full Code Here


    return new ConstructorBindingImpl(null, paramKey, getSource(), this.factory, getScoping(), this.factory, this.constructorInjectionPoint);
  }

  public void applyTo(Binder paramBinder)
  {
    InjectionPoint localInjectionPoint = getConstructor();
    getScoping().applyTo(paramBinder.withSource(getSource()).bind(getKey()).toConstructor((Constructor)getConstructor().getMember(), localInjectionPoint.getDeclaringType()));
  }
View Full Code Here

    Iterator localIterator = localSet.iterator();
    while (localIterator.hasNext())
    {
      Dependency localDependency = (Dependency)localIterator.next();
      Key localKey = localDependency.getKey();
      InjectionPoint localInjectionPoint = localDependency.getInjectionPoint();
      if (paramSet.add(localKey))
      {
        BindingImpl localBindingImpl = (BindingImpl)this.jitBindings.get(localKey);
        if (localBindingImpl != null)
        {
View Full Code Here

      copyErrorsToBinder(localConfigurationException1);
      localSet = (Set)localConfigurationException1.getPartialValue();
    }
    try
    {
      InjectionPoint localInjectionPoint = InjectionPoint.forConstructor(paramConstructor, paramTypeLiteral);
      setBinding(new ConstructorBindingImpl(localBindingImpl.getKey(), localBindingImpl.getSource(), localBindingImpl.getScoping(), localInjectionPoint, localSet));
    }
    catch (ConfigurationException localConfigurationException2)
    {
      copyErrorsToBinder(localConfigurationException2);
View Full Code Here

  private static class LoggerFactory
    implements Provider, InternalFactory
  {
    public Logger get(Errors paramErrors, InternalContext paramInternalContext, Dependency paramDependency, boolean paramBoolean)
    {
      InjectionPoint localInjectionPoint = paramDependency.getInjectionPoint();
      return localInjectionPoint == null ? Logger.getAnonymousLogger() : Logger.getLogger(localInjectionPoint.getMember().getDeclaringClass().getName());
    }
View Full Code Here

    Iterator localIterator = localSet.iterator();
    while (localIterator.hasNext())
    {
      Dependency localDependency = (Dependency)localIterator.next();
      Key localKey = localDependency.getKey();
      InjectionPoint localInjectionPoint = localDependency.getInjectionPoint();
      if (paramSet.add(localKey))
      {
        BindingImpl localBindingImpl = (BindingImpl)this.jitBindings.get(localKey);
        if (localBindingImpl != null)
        {
View Full Code Here

    return new ConstructorBindingImpl(null, paramKey, getSource(), this.factory, getScoping(), this.factory, this.constructorInjectionPoint);
  }

  public void applyTo(Binder paramBinder)
  {
    InjectionPoint localInjectionPoint = getConstructor();
    getScoping().applyTo(paramBinder.withSource(getSource()).bind(getKey()).toConstructor((Constructor)getConstructor().getMember(), localInjectionPoint.getDeclaringType()));
  }
View Full Code Here

  private static class LoggerFactory
    implements Provider, InternalFactory
  {
    public Logger get(Errors paramErrors, InternalContext paramInternalContext, Dependency paramDependency, boolean paramBoolean)
    {
      InjectionPoint localInjectionPoint = paramDependency.getInjectionPoint();
      return localInjectionPoint == null ? Logger.getAnonymousLogger() : Logger.getLogger(localInjectionPoint.getMember().getDeclaringClass().getName());
    }
View Full Code Here

      };
    HashSet localHashSet = $Sets.newHashSet();
    Object localObject = localSet.iterator();
    while (((Iterator)localObject).hasNext())
    {
      InjectionPoint localInjectionPoint = (InjectionPoint)((Iterator)localObject).next();
      localHashSet.addAll(localInjectionPoint.getDependencies());
    }
    localObject = $ImmutableSet.copyOf(localHashSet);
    return new ProviderWithDependencies()
    {
      @Inject
View Full Code Here

  private boolean cleanup(BindingImpl<?> binding, Set<Key> encountered) {
    boolean bindingFailed = false;
    Set<Dependency<?>> deps = getInternalDependencies(binding);
    for(Dependency dep : deps) {
      Key<?> depKey = dep.getKey();
      InjectionPoint ip = dep.getInjectionPoint();
      if(encountered.add(depKey)) { // only check if we haven't looked at this key yet
        BindingImpl depBinding = jitBindings.get(depKey);
        if(depBinding != null) { // if the binding still exists, validate
          boolean failed = cleanup(depBinding, encountered); // if children fail, we fail
          if(depBinding instanceof ConstructorBindingImpl) {
View Full Code Here

TOP

Related Classes of com.google.inject.spi.InjectionPoint$Factory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.