se.jbee.inject
Class Target
Object
se.jbee.inject.Target
- All Implemented Interfaces:
- PreciserThan<Target>
public final class Target
- extends Object
- implements PreciserThan<Target>
Describes where a Resource is available for injection.
This can be restricted by the Packages the injected that is injected is defined in or the
Type of the receiving instance.
- Author:
- Jan Bernitt (jan@jbee.se)
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ANY
public static final Target ANY
targeting
public static Target targeting(Class<?> type)
targeting
public static Target targeting(Type<?> type)
targeting
public static Target targeting(Instance<?> instance)
within
public Target within(Instance<?> parent)
injectingInto
public Target injectingInto(Instance<?> instance)
in
public Target in(Packages packages)
injectingInto
public Target injectingInto(Type<?> type)
injectingInto
public Target injectingInto(Class<?> type)
isApplicableFor
public boolean isApplicableFor(Dependency<?> dependency)
isAdequateFor
public boolean isAdequateFor(Dependency<?> dependency)
isAccessibleFor
public boolean isAccessibleFor(Dependency<?> dependency)
toString
public String toString()
- Overrides:
toString in class Object
inPackageAndSubPackagesOf
public Target inPackageAndSubPackagesOf(Class<?> type)
inPackageOf
public Target inPackageOf(Class<?> type)
inSubPackagesOf
public Target inSubPackagesOf(Class<?> type)
morePreciseThan
public boolean morePreciseThan(Target other)
- Specified by:
morePreciseThan in interface PreciserThan<Target>
- Returns:
- Whether or not this object or more precise than the given one. Equal objects are not
more precise! Also objects that have no common context or relationship are never more
precise. An example would be that two
Types with no common super-type do not
define one of them that is more precise.
equalTo
public boolean equalTo(Target other)