Package com.google.inject

Examples of com.google.inject.ProvidedBy


    ImplementedBy implementedBy = type.getRawType().getAnnotation(ImplementedBy.class);
    if (implementedBy != null) {
      return createImplementedByBinding(key, implementedBy);
    }

    ProvidedBy providedBy = type.getRawType().getAnnotation(ProvidedBy.class);
    if (providedBy != null) {
      return createProvidedByBinding(key, providedBy);
    }

    // 10. If the dependency is abstract or a non-static inner class, give up.
View Full Code Here


      Annotations.checkForMisplacedScopeAnnotations(rawType, source, errors);
      return createImplementedByBinding(key, scoping, implementedBy, errors);
    }

    // Handle @ProvidedBy.
    ProvidedBy providedBy = rawType.getAnnotation(ProvidedBy.class);
    if (providedBy != null) {
      Annotations.checkForMisplacedScopeAnnotations(rawType, source, errors);
      return createProvidedByBinding(key, scoping, providedBy, errors);
    }
View Full Code Here

      Annotations.checkForMisplacedScopeAnnotations(rawType, source, errors);
      return createImplementedByBinding(key, scoping, implementedBy, errors);
    }

    // Handle @ProvidedBy.
    ProvidedBy providedBy = rawType.getAnnotation(ProvidedBy.class);
    if (providedBy != null) {
      Annotations.checkForMisplacedScopeAnnotations(rawType, source, errors);
      return createProvidedByBinding(key, scoping, providedBy, errors);
    }
View Full Code Here

                {
                    requireKey( Key.get( implementedBy.value() ) );
                }
                else
                {
                    final ProvidedBy providedBy = clazz.getAnnotation( ProvidedBy.class );
                    if ( null != providedBy )
                    {
                        requireKey( Key.get( providedBy.value() ) );
                    }
                }
            }
        }
    }
View Full Code Here

                {
                    binder.bind( TypeArguments.implicitKey( clazz ) ).to( (Class) implementedBy.value() );
                }
                else
                {
                    final ProvidedBy providedBy = clazz.getAnnotation( ProvidedBy.class );
                    if ( null != providedBy )
                    {
                        binder.bind( TypeArguments.implicitKey( clazz ) ).toProvider( (Class) providedBy.value() );
                    }
                }
            }
        }
        catch ( final RuntimeException e ) // NOPMD
View Full Code Here

    if (localObject != null)
    {
      Annotations.checkForMisplacedScopeAnnotations(localClass, paramObject, paramErrors);
      return createImplementedByBinding(paramKey, paramScoping, (ImplementedBy)localObject, paramErrors);
    }
    ProvidedBy localProvidedBy = (ProvidedBy)localClass.getAnnotation(ProvidedBy.class);
    if (localProvidedBy != null)
    {
      Annotations.checkForMisplacedScopeAnnotations(localClass, paramObject, paramErrors);
      return createProvidedByBinding(paramKey, paramScoping, localProvidedBy, paramErrors);
    }
View Full Code Here

    if (localObject != null)
    {
      Annotations.checkForMisplacedScopeAnnotations(localClass, paramObject, paramErrors);
      return createImplementedByBinding(paramKey, paramScoping, (ImplementedBy)localObject, paramErrors);
    }
    ProvidedBy localProvidedBy = (ProvidedBy)localClass.getAnnotation(ProvidedBy.class);
    if (localProvidedBy != null)
    {
      Annotations.checkForMisplacedScopeAnnotations(localClass, paramObject, paramErrors);
      return createProvidedByBinding(paramKey, paramScoping, localProvidedBy, paramErrors);
    }
View Full Code Here

      Annotations.checkForMisplacedScopeAnnotations(rawType, source, errors);
      return createImplementedByBinding(key, scoping, implementedBy, errors);
    }

    // Handle @ProvidedBy.
    ProvidedBy providedBy = rawType.getAnnotation(ProvidedBy.class);
    if (providedBy != null) {
      Annotations.checkForMisplacedScopeAnnotations(rawType, source, errors);
      return createProvidedByBinding(key, scoping, providedBy, errors);
    }
View Full Code Here

TOP

Related Classes of com.google.inject.ProvidedBy

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.