|
Silk DI 0.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
ObjectEnum<DeclarationType>
se.jbee.inject.DeclarationType
public enum DeclarationType
The DeclarationType is used to keep track of the origin of binding declarations. They
describe how or why a binding has been made whereby they get different significance and meaning.
While binds consciously done by API calls through the programmer result in EXPLICIT or
MULTI there are 3 weaker types for those binds that added indirectly. They provide a
convenient fall-back behaviour that allows to omit simple self-evident binds but allow to
override these fall-backs explicitly.
It is important to distinguish binds in that way since binds always have to be unambiguous. Two
equivalent binds would clashesWith(DeclarationType) each other.
| Enum Constant Summary | |
|---|---|
AUTO
A auto-bind has been used. |
|
DEFAULT
Used to provide a default of required parts of a module that can be replaced *once* to customize behavior. |
|
EXPLICIT
The bind has been made explicitly by a module (should be a unique Resource) |
|
IMPLICIT
Has been added by the binder as a fall-back since some bind-calls can have ambiguous intentions. |
|
MULTI
A bind that is meant to co-exist with others that might have the same Resource. |
|
PROVIDED
|
|
REQUIRED
A binding that is just expressing the instance needed but not how to supply it. |
|
| Method Summary | |
|---|---|
boolean |
clashesWith(DeclarationType other)
|
boolean |
morePreciseThan(DeclarationType other)
|
boolean |
nullifiedBy(DeclarationType other)
|
boolean |
replacedBy(DeclarationType other)
|
static DeclarationType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static DeclarationType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final DeclarationType IMPLICIT
public static final DeclarationType DEFAULT
Resource and still just one explicit
replacement for it.
public static final DeclarationType PROVIDED
public static final DeclarationType AUTO
EXPLICIT and to all its super-classes and -interfaces as a AUTO bound bind.
public static final DeclarationType MULTI
Resource. Those
have to be defined as MULTI as well!
public static final DeclarationType EXPLICIT
Resource)
public static final DeclarationType REQUIRED
| Method Detail |
|---|
public static DeclarationType[] values()
for (DeclarationType c : DeclarationType.values()) System.out.println(c);
public static DeclarationType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic boolean morePreciseThan(DeclarationType other)
morePreciseThan in interface PreciserThan<DeclarationType>Types with no common super-type do not
define one of them that is more precise.public boolean clashesWith(DeclarationType other)
public boolean replacedBy(DeclarationType other)
public boolean nullifiedBy(DeclarationType other)
|
Silk DI 0.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||