com.googlecode.icegem.serialization.codegen
Class DataSerializerGenerator

java.lang.Object
  extended by com.googlecode.icegem.serialization.codegen.DataSerializerGenerator

public class DataSerializerGenerator
extends Object

 Class that generate for class XYZ.class special serializer: class XYZDataSerializer extends DataSerializer
 {...} by Javassist lib. 

Author:
igolovach

Field Summary
static String PARENT_CLASS
          All DataSerializer-s will extend this class.
 
Constructor Summary
DataSerializerGenerator()
           
 
Method Summary
static List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader, Class<?>... classArray)
           
static List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader, List<Class<?>> classList)
           
static List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader, List<Class<?>> classList, String outputDir)
          2-stage compilation scheme of group of classes:
static void registerCodeGenerationListener(CodeGenerationListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARENT_CLASS

public static final String PARENT_CLASS
All DataSerializer-s will extend this class.

See Also:
Constant Field Values
Constructor Detail

DataSerializerGenerator

public DataSerializerGenerator()
Method Detail

generateDataSerializerClasses

public static List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader,
                                                           Class<?>... classArray)
                                                    throws javassist.CannotCompileException,
                                                           InvalidClassException
Throws:
javassist.CannotCompileException
InvalidClassException

generateDataSerializerClasses

public static List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader,
                                                           List<Class<?>> classList)
                                                    throws javassist.CannotCompileException,
                                                           InvalidClassException
Throws:
javassist.CannotCompileException
InvalidClassException

generateDataSerializerClasses

public static List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader,
                                                           List<Class<?>> classList,
                                                           String outputDir)
                                                    throws javassist.CannotCompileException,
                                                           InvalidClassException
2-stage compilation scheme of group of classes:

hack from http://www.csg.is.titech.ac.jp/~chiba/javassist/tutorial/tutorial2.html#add

order of return of serializer-classes in response corresponds to order of arg-classes

Throws:
javassist.CannotCompileException
InvalidClassException

registerCodeGenerationListener

public static void registerCodeGenerationListener(CodeGenerationListener l)


Copyright © 2011. All Rights Reserved.