|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FudgeBuilderFactory
Factory interface for constructing builders for classes that haven't been explicitly
registered with a FudgeObjectDictionary
. The factory should not attempt to
cache results - the FudgeObjectDictionary
will do that.
Method Summary | ||
---|---|---|
|
addGenericBuilder(Class<T> clazz,
FudgeBuilder<T> builder)
Registers a generic builder with the factory that may be returned as a FudgeObjectBuilder for
the class, or as a FudgeMessageBuilder for any sub-classes of the class. |
|
|
createMessageBuilder(Class<T> clazz)
Creates a new FudgeMessageBuilder for encoding objects of the given class into Fudge messages. |
|
|
createObjectBuilder(Class<T> clazz)
Creates a new FudgeObjectBuilder for deserializing Fudge messages into the given class. |
Method Detail |
---|
<T> FudgeObjectBuilder<T> createObjectBuilder(Class<T> clazz)
FudgeObjectBuilder
for deserializing Fudge messages into the given class.
T
- the class the builder should create objects ofclazz
- the class the builder should create objects of
null
if none is available<T> FudgeMessageBuilder<T> createMessageBuilder(Class<T> clazz)
FudgeMessageBuilder
for encoding objects of the given class into Fudge messages.
T
- the class the builder should create messages fromclazz
- the class the builder should create messages from
null
if none is available<T> void addGenericBuilder(Class<T> clazz, FudgeBuilder<T> builder)
FudgeObjectBuilder
for
the class, or as a FudgeMessageBuilder
for any sub-classes of the class. After calling this, a
factory may choose to return an alternative builder, but may not return null
for a class which
the generic builder has been registered for.
T
- the generic type (probably an interface) the builder is forclazz
- the generic type (probably an interface) the builder is forbuilder
- the builder to register
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |