|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SerializeToGenerator
Interface that is able to create statements that are directly related to the serializeTo and deserializeFrom
methods of a serializer
| Method Summary | |
|---|---|
boolean |
canHandle(com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
Whether this generator is able to handle the given field |
com.sun.codemodel.JStatement |
createAddToSerializeToExpression(AbstractGenerator<?> generator,
com.sun.codemodel.JDefinedClass serializerClass,
com.sun.codemodel.JExpression serializeTo,
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo,
com.sun.codemodel.JVar object,
com.sun.codemodel.JVar formatVersion)
Creates a statement that is used to store the object (converted as string) to the serializeTo object |
com.cedarsoft.codegen.Expressions |
createReadFromDeserializeFromExpression(AbstractGenerator<?> generator,
com.sun.codemodel.JDefinedClass serializerClass,
com.sun.codemodel.JExpression deserializeFrom,
com.sun.codemodel.JVar wrapper,
com.sun.codemodel.JVar formatVersion,
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
Creates an expression that is used to read an object (as String) from deserializeFrom |
com.sun.codemodel.JClass |
generateFieldType(com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
|
| Method Detail |
|---|
@Nonnull
com.sun.codemodel.JStatement createAddToSerializeToExpression(@Nonnull
AbstractGenerator<?> generator,
@Nonnull
com.sun.codemodel.JDefinedClass serializerClass,
@Nonnull
com.sun.codemodel.JExpression serializeTo,
@Nonnull
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo,
@Nonnull
com.sun.codemodel.JVar object,
@Nonnull
com.sun.codemodel.JVar formatVersion)
serializeTo object
generator - the generatorserializerClass - the serializer classserializeTo - the serialize to varfieldInfo - the field info @return the invocation the serializes the givenobject - the object that is serialized @return the created statementformatVersion - the format version
@Nonnull
com.cedarsoft.codegen.Expressions createReadFromDeserializeFromExpression(@Nonnull
AbstractGenerator<?> generator,
@Nonnull
com.sun.codemodel.JDefinedClass serializerClass,
@Nonnull
com.sun.codemodel.JExpression deserializeFrom,
com.sun.codemodel.JVar wrapper,
@Nonnull
com.sun.codemodel.JVar formatVersion,
@Nonnull
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
deserializeFrom
generator - the generatorserializerClass - the serializer classdeserializeFrom - the object that shall be used to deserialize fromwrapper - the (optional) wrapperformatVersion - the format versionfieldInfo - the field info @return the expression that returns the object as string @return the created statement @return the created expression
@Nonnull
com.sun.codemodel.JClass generateFieldType(@Nonnull
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
boolean canHandle(@Nonnull
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
fieldInfo - the field info
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||