public final class ClassDependency extends Object implements Dependency
An implementation of the Dependency
interface that allows to
define a dependency based on a bean class.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this object with another one.
|
ClassDescription |
getDependentClass()
Returns the description of the class of this dependency.
|
static ClassDependency |
getInstance(Class<?> cls)
Returns a
ClassDependency instance for the specified
class. |
static ClassDependency |
getInstance(ClassDescription clsdsc)
Returns a
ClassDependency instance for the specified
ClassDescription . |
int |
hashCode()
Returns a hash code for this object.
|
BeanProvider |
resolve(BeanStore store,
DependencyProvider depProvider)
Resolves this dependency on the specified bean store.
|
String |
toString()
Returns a string representation of this object.
|
public ClassDescription getDependentClass()
public BeanProvider resolve(BeanStore store, DependencyProvider depProvider)
resolve
in interface Dependency
store
- the bean store to be searcheddepProvider
- the dependency providerInjectionException
- if no fitting bean provider can be foundpublic boolean equals(Object obj)
public int hashCode()
public String toString()
public static ClassDependency getInstance(Class<?> cls)
ClassDependency
instance for the specified
class.cls
- the class of the dependency (must not be null)IllegalArgumentException
- if the class is nullpublic static ClassDependency getInstance(ClassDescription clsdsc)
ClassDependency
instance for the specified
ClassDescription
.clsdsc
- the class descriptionIllegalArgumentException
- if the class description is nullCopyright © 2016 The JGUIraffe Team. All rights reserved.