A B C D F G I L M N O R S T U V 
All Classes All Packages

A

accept(Visitor, int) - Method in interface magnet.Scope
Visits all instances and child scopes of given depth (use Integer.MAX_VALUE for visiting all scopes).

B

bind(Class<T>, T) - Method in interface magnet.Scope
Binds given instance into this scope.
bind(Class<T>, T, String) - Method in interface magnet.Scope
Binds given instance into this scope.
BOUND - magnet.Visitor.Provision
 

C

classifier() - Method in annotation type magnet.Instance
Classifier to use when annotated instance gets registered in scope.
classifier() - Method in annotation type magnet.internal.Index
 
Classifier - Annotation Type in magnet
Magnet can bind multiple instances of the same type into a scope.
create(Scope, Class<T>, String, Scoping, Factory.Instantiator<T>) - Method in interface magnet.Factory
Implementation must return instance of give type without delegating the call to the given scope.
create(Scope) - Method in class magnet.internal.InstanceFactory
 
createRootScope() - Static method in class magnet.internal.InternalFactory
 
createRootScope() - Static method in class magnet.Magnet
 
createSubscope() - Method in interface magnet.Scope
Creates a new child scope of this scope.

D

DEFAULT_SELECTOR - Static variable in class magnet.SelectorFilter
 
DIRECT - magnet.Scoping
Magnet will bind created instance into the same scope, in which this instance has been created.
disabled() - Method in annotation type magnet.Instance
Magnet ignores this annotation when this flag is set to true.
dispose() - Method in interface magnet.Scope
Disposes this and all children scopes.
dispose(T) - Method in class magnet.internal.InstanceFactory
 
disposer() - Method in annotation type magnet.Instance
Name of optional disposer method to be called, when whole scope gets disposed.

F

factory() - Method in annotation type magnet.Instance
Custom factory to be used for creating instance instead of the generated one.
Factory<T> - Interface in magnet
Custom factory to be used with Instance.factory().
Factory.Instantiator<T> - Interface in magnet
Instantiator creates new instance of given type using new operator.
factoryClass() - Method in annotation type magnet.internal.Index
 
factoryType() - Method in annotation type magnet.internal.Index
 
filter(String[]) - Method in class magnet.SelectorFilter
 

G

Generated - Annotation Type in magnet.internal
Subject to change.
getClassifier() - Method in interface magnet.Visitor.Instance
 
getLimit() - Method in class magnet.internal.InstanceFactory
 
getLimit() - Method in interface magnet.Visitor.Instance
 
getLimits() - Method in interface magnet.Visitor.Scope
 
getMany(Class<T>) - Method in interface magnet.Scope
Returns a list of objects or empty list, if no objects were found.
getMany(Class<T>, String) - Method in interface magnet.Scope
Returns a list of objects or empty list, if no objects were found.
getOptional(Class<T>) - Method in interface magnet.Scope
Returns an object from the scope or null, if object was not found.
getOptional(Class<T>, String) - Method in interface magnet.Scope
Returns an object from the scope or null, if object was not found.
getProvision() - Method in interface magnet.Visitor.Instance
 
getScoping() - Method in class magnet.internal.InstanceFactory
 
getScoping() - Method in interface magnet.Visitor.Instance
 
getSelector() - Method in class magnet.internal.InstanceFactory
 
getSiblingTypes() - Method in class magnet.internal.InstanceFactory
 
getSingle(Class<T>) - Method in interface magnet.Scope
Returns an object from the scope or throws exception, if object was not found.
getSingle(Class<T>, String) - Method in interface magnet.Scope
Returns an object from the scope or throws exception, if object was not found.
getType() - Method in interface magnet.Visitor.Instance
 
getValue() - Method in interface magnet.Visitor.Instance
 

I

Index - Annotation Type in magnet.internal
Subject to change.
INJECTED - magnet.Visitor.Provision
 
Instance - Annotation Type in magnet
Magnet instantiates classes marked with this annotation automatically.
InstanceFactory<T> - Class in magnet.internal
 
InstanceFactory() - Constructor for class magnet.internal.InstanceFactory
 
instanceType() - Method in annotation type magnet.internal.Index
 
instantiate(Scope) - Method in interface magnet.Factory.Instantiator
 
InternalFactory - Class in magnet.internal
 
isDisposable() - Method in class magnet.internal.InstanceFactory
 
isDisposed() - Method in interface magnet.Scope
Returns `true` is the scope is disposed, or `false` otherwise.

L

limit(String...) - Method in interface magnet.Scope
Sets given limits to this scope.
limitedTo() - Method in annotation type magnet.Instance
Limit tag to be used with Scoping.TOPMOST algorithm.

M

magnet - package magnet
 
Magnet - Class in magnet
 
magnet.internal - package magnet.internal
 

N

NONE - Static variable in annotation type magnet.Classifier
 

O

onEnterScope(Visitor.Scope, Visitor.Scope) - Method in interface magnet.Visitor
Called when new scope is entered.
onExitScope(Visitor.Scope) - Method in interface magnet.Visitor
Called when previously entered scope is exited.
onInstance(Visitor.Instance) - Method in interface magnet.Visitor
Called when visiting new instance between Visitor.onEnterScope(Scope, Scope) and Visitor.onExitScope(Scope) calls.

R

Registry - Annotation Type in magnet
This marker annotation instructs Magnet to generate a registry indexing all instances available in classpath.

S

Scope - Interface in magnet
Scope is a container for objects which are stored there at runtime.
scoping() - Method in annotation type magnet.Instance
Scoping rule to be applied when instance of annotated class gets created.
Scoping - Enum in magnet
Declares the way Magnet binds instances of @Instance-annotated classes into scopes.
selector() - Method in annotation type magnet.Instance
Experimental. Magnet will only create instance of the annotated class if this selector expression is true after evaluation.
SelectorFilter - Class in magnet
Selector handler for processing Instance.selector() value at runtime.
SelectorFilter() - Constructor for class magnet.SelectorFilter
 

T

TOPMOST - magnet.Scoping
Magnet will bind created instance into the most top scope in the chain of scopes, where all dependencies for the created instance are still fulfilled.
type() - Method in annotation type magnet.Instance
Type to use when annotated instance gets registered in scope.
types() - Method in annotation type magnet.Instance
Multiple types to use when annotated instance gets registered in scope.

U

UNSCOPED - magnet.Scoping
Magnet will not bind created instance into any scope.

V

value() - Method in annotation type magnet.Classifier
 
valueOf(String) - Static method in enum magnet.Scoping
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum magnet.Visitor.Provision
Returns the enum constant of this type with the specified name.
values() - Static method in enum magnet.Scoping
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum magnet.Visitor.Provision
Returns an array containing the constants of this enum type, in the order they are declared.
Visitor - Interface in magnet
Implementation of this interface should be used with Scope.accept(Visitor, int) for iterating though instances and subscopes of a scope.
Visitor.Instance - Interface in magnet
Visited instance.
Visitor.Provision - Enum in magnet
Provision type.
Visitor.Scope - Interface in magnet
Visited scope.
A B C D F G I L M N O R S T U V 
All Classes All Packages