public interface SerializeToGenerator
serializeTo and deserializeFrom
methods of a serializer| Modifier and Type | Method and Description |
|---|---|
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) |
@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 objectgenerator - 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)
deserializeFromgenerator - 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 infoCopyright © 2013 cedarsoft GmbH. All rights reserved.