Class ProviderMethod<T>

    • Field Detail

      • instance

        protected final Object instance
      • method

        protected final Method method
    • Method Detail

      • getInstance

        public Object getInstance()
      • getEnclosingInstance

        public Object getEnclosingInstance()
        Description copied from interface: ProvidesMethodBinding
        Returns the instance of the object the method is defined in.
      • getAnnotation

        public Annotation getAnnotation()
        Description copied from interface: ProvidesMethodBinding
        Returns the annotation that caused this binding to be created. For @Provides methods, this is an instance of the @Provides annotation. For bindings from ModuleAnnotatedMethodScanner, this is the annotation that caused the scanner to produce the binding.
      • configure

        public void configure(Binder binder)
      • get

        public T get()
        Description copied from interface: Provider
        Provides an instance of T. Must never return null.
      • getDependencies

        public Set<Dependency<?>> getDependencies()
        Description copied from interface: HasDependencies
        Returns the known dependencies for this type. If this has dependencies whose values are not known statically, a dependency for the Injector will be included in the returned set.
        Specified by:
        getDependencies in interface  HasDependencies
        Returns:
        a possibly empty set
      • acceptExtensionVisitor

        public <B,V> V acceptExtensionVisitor(BindingTargetVisitor<B,V> visitor,
                                              ProviderInstanceBinding<? extends B> binding)
        Description copied from interface: ProviderWithExtensionVisitor
        Instructs the extension determine if the visitor is an instance of a custom extension visitor, and if so, visit it using that method. If the visitor is not an instance of the custom extension visitor, this method MUST call visitor.visit(binding).

        Due to issues with generics, the type parameters of this method do not relate to the type of the provider. In practice, the 'B' type will always be a supertype of 'T'.

      • toString

        public String toString()
      • equals

        public boolean equals(Object obj)
      • hashCode

        public int hashCode()