Silk DI 0.6


se.jbee.inject
Class Target

Object
  extended by 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)

Field Summary
static Target ANY
           
 
Method Summary
 boolean equalTo(Target other)
           
 Target in(Packages packages)
           
 Target injectingInto(Class<?> type)
           
 Target injectingInto(Instance<?> instance)
           
 Target injectingInto(Type<?> type)
           
 Target inPackageAndSubPackagesOf(Class<?> type)
           
 Target inPackageOf(Class<?> type)
           
 Target inSubPackagesOf(Class<?> type)
           
 boolean isAccessibleFor(Dependency<?> dependency)
           
 boolean isAdequateFor(Dependency<?> dependency)
           
 boolean isApplicableFor(Dependency<?> dependency)
           
 boolean morePreciseThan(Target other)
           
static Target targeting(Class<?> type)
           
static Target targeting(Instance<?> instance)
           
static Target targeting(Type<?> type)
           
 String toString()
           
 Target within(Instance<?> parent)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANY

public static final Target ANY
Method Detail

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)

Silk DI 0.6