|
||||||||||
| 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)
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 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 |
|---|
@NotNull
com.sun.codemodel.JStatement createAddToSerializeToExpression(@NotNull
AbstractGenerator<?> generator,
@NotNull
com.sun.codemodel.JDefinedClass serializerClass,
@NotNull
com.sun.codemodel.JExpression serializeTo,
@NotNull
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo,
@NotNull
com.sun.codemodel.JVar object)
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 statement
@NotNull
com.cedarsoft.codegen.Expressions createReadFromDeserializeFromExpression(@NotNull
AbstractGenerator<?> generator,
@NotNull
com.sun.codemodel.JDefinedClass serializerClass,
@NotNull
com.sun.codemodel.JExpression deserializeFrom,
@NotNull
com.sun.codemodel.JVar formatVersion,
@NotNull
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
deserializeFrom
generator - the generatorserializerClass - the serializer classdeserializeFrom - the object that shall be used to deserialize fromformatVersion - the format versionfieldInfo - the field info @return the expression that returns the object as string @return the created statement @return the created expression
@NotNull
com.sun.codemodel.JClass generateFieldType(@NotNull
com.cedarsoft.codegen.model.FieldDeclarationInfo fieldInfo)
boolean canHandle(@NotNull
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 | |||||||||