public class Scopes extends Object
public static final Scope SINGLETON
public static final Scope NO_SCOPE
This exists only in case a class has been annotated with a scope
annotation such as @Singleton
, and you need to override
this to "no scope" in your binding.
public static boolean isSingleton(Binding<?> binding)
binding
is singleton-scoped. If the binding is a linked key binding
and belongs to an injector (ie. it
was retrieved via Injector.getBinding()
), then this method will
also true if the target binding is singleton-scoped.