|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.grimoire.formtree.receiver.constructor.StringConstructorReceiver<T>
T - the type of the object to create.public class StringConstructorReceiver<T>
A form receiver that uses constructors with the signature (String). The first
value passed to values(Iterable) will be used to populate the field;
other values will be ignored.
| Constructor Summary | |
|---|---|
StringConstructorReceiver(java.lang.Class<T> valueClass)
Creates a StringConstructorReceiver that creates instances of valueClass. |
|
| Method Summary | ||
|---|---|---|
static boolean |
accepts(java.lang.Class<?> formClass)
Checkes whether StringConstructorReceiver is able to construct
instances of a given class. |
|
static
|
create(java.lang.Class<T> parameterType)
A type-inferring alternative to calling StringConstructorReceiver(Class). |
|
T |
finished()
Notifies the receiver that form decoding has finished. |
|
FormElementReceiver |
index(int index)
Adds an index to the decoded form. |
|
FormElementReceiver |
key(java.lang.String field)
Adds a key to the decoded form. |
|
void |
values(java.lang.Iterable<java.lang.String> values)
Add a terminal value to the decoded form. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringConstructorReceiver(java.lang.Class<T> valueClass)
valueClass - the class of the product to create.| Method Detail |
|---|
public static boolean accepts(java.lang.Class<?> formClass)
StringConstructorReceiver is able to construct
instances of a given class. StringConstructorReceiver can
construct any class that has a constructor with the signature (String).
formClass - the class to interrogate.
StringConstructorReceiver can create
formClass.public static <T> StringConstructorReceiver<T> create(java.lang.Class<T> parameterType)
StringConstructorReceiver(Class).
T - the type of the value to construct.parameterType - the class of <T>
StringConstructorReceiver.public T finished()
FormReceiver
finished in interface FormReceiver<T>public FormElementReceiver key(java.lang.String field)
FormElementReceiver
key in interface FormElementReceiverfield - the field to decode.
public FormElementReceiver index(int index)
FormElementReceiver
index in interface FormElementReceiverindex - the index to decode.
public void values(java.lang.Iterable<java.lang.String> values)
FormElementReceiver
values in interface FormElementReceivervalues - the values to store.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||