|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.StoreBinder<T,L>
public abstract class StoreBinder<T,L>
This implementation executes an array of components sequentially
and collect the results into an ElementStore object created by the toStore(Object)
method.
| Constructor Summary | |
|---|---|
StoreBinder(Creator<T>[] steps)
Create a StoreBinder object. |
|
| Method Summary | |
|---|---|
Creator<L> |
bind(L v)
Creates a Creator object according to a value. |
java.lang.Class |
bindType(java.lang.Class type)
Get the type of the component being bound. |
void |
checkElement(int i,
java.lang.Class type)
Subclasses may choose to override this method to provide additional checking for the element types and indexes. |
boolean |
equals(java.lang.Object obj)
|
Creator<T>[] |
getProducers()
|
int |
hashCode()
|
abstract ElementStore<T> |
toStore(L v)
Subclasses need to override this method to create the ElementStore object needed to collect the component instances. |
java.lang.String |
toString()
|
Verifiable |
verify(java.lang.Class type)
Get a Verifiable object that's responsible for verifying the component being bound. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StoreBinder(Creator<T>[] steps)
steps - the components to be executed sequentially.| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic Verifiable verify(java.lang.Class type)
ComponentBinder
verify in interface ComponentBinder<L,L>type - the type of the previous component. It cannot be null.
public java.lang.Class bindType(java.lang.Class type)
ComponentBinder
bindType in interface ComponentBinder<L,L>type - the type of the previous component, it can be null.
public Creator<L> bind(L v)
throws java.lang.Throwable
Binder
bind in interface Binder<L,L>v - the value.
java.lang.Throwable - if any error happens in the bind.public abstract ElementStore<T> toStore(L v)
v - this is the same value received from the bind(Object)
method. It is normally a collection object. Based on its type, a proper ElementStore
object can be created to populate the instances into it.
public void checkElement(int i,
java.lang.Class type)
checkElement in interface ElementCheckeri - the index of the element.type - the element type.public Creator<T>[] getProducers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||