|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.Component<T>
jfun.yan.Creator2Component<T>
public class Creator2Component<T>
To adapt a Creator object to Component.
| Constructor Summary | |
|---|---|
Creator2Component(Creator<T> creator)
|
|
| Method Summary | |
|---|---|
T |
create(Dependency dep)
Create a component instance. |
boolean |
equals(java.lang.Object other)
|
protected Creator<T> |
getCreator()
Gets the Creator object adapted. |
java.lang.Class<T> |
getType()
Get the type of instances that this component is responsible to create. |
int |
hashCode()
|
boolean |
isConcrete()
To determine if the type returned by getType() is the concrete type of the real instance. |
boolean |
isSingleton()
Determines if the component always return the same instance and has no side-effect that causes difference when called the second time. |
java.lang.String |
toString()
|
java.lang.Class<T> |
verify(Dependency dep)
Verifies that the component's dependencies are satisfiable. |
| Methods inherited from class jfun.yan.Component |
|---|
bean, bean, bean, bind, bind, bindArgument, bindArguments, bindProperties, bindProperty, cast, factory, factory, factory, factory, factory, field, field, field, followedBy, followedBy, followedBy, fromArguments, fromProperties, getState, getter, getter, guard, ifelse, ignoreProperty, incomplete, label, label, map, method, method, method, method, method, mutate, option, optional, optionalParameter, optionalParameters, optionalProperties, optionalProperty, proxy, proxy, proxy, recover, repeat, seal, seq, setter, setter, singleton, singleton, subsume, synchronize, withArgument, withArgument, withArguments, withArguments, withDefaultArgument, withDefaultProperty, withProperties, withProperties, withProperties, withProperty, withProperty, withState |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Creator2Component(Creator<T> creator)
| Method Detail |
|---|
public boolean isConcrete()
CreatorA strict static type check will be performed on concrete types.
public T create(Dependency dep)
Creator
dep - the provider that provides all dependent data.
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.Class<T> getType()
Component
getType in interface Creator<T>getType in interface TypefulgetType in class Component<T>public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Class<T> verify(Dependency dep)
Verifiable
dep - the provider that provides all dependent information.protected final Creator<T> getCreator()
public boolean isSingleton()
CreatorThis information may be useful to certain optimizations.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||