Class SerializationCodeGenerator


  • public final class SerializationCodeGenerator
    extends Object
    Serialization code generator for stubs and execution classes.
    • Field Detail

      • DESERIALIZE_DESCRIPTOR

        public static final String DESERIALIZE_DESCRIPTOR
        Deserialize signature.
      • DESERIALIZE_SIGNATURE

        public static final String DESERIALIZE_SIGNATURE
        Partial deserialize signature. Extracted from ASMifier.
        See Also:
        Constant Field Values
      • PARTIAL_DESERIALIZE_DESCRIPTOR

        public static final String PARTIAL_DESERIALIZE_DESCRIPTOR
        Partial deserialize descriptor.
      • PARTIAL_DESERIALIZE_SIGNATURE

        public static final String PARTIAL_DESERIALIZE_SIGNATURE
        Partial deserialize signature. Extracted from ASMifier.
        See Also:
        Constant Field Values
      • SERIALIZE_DESCRIPTOR

        public static final String SERIALIZE_DESCRIPTOR
        Serialize signature.
      • SERIALIZE_SIGNATURE

        public static final String SERIALIZE_SIGNATURE
        Serialize signature. Extracted from ASMifier.
        See Also:
        Constant Field Values
      • PARTIAL_SERIALIZE_DESCRIPTOR

        public static final String PARTIAL_SERIALIZE_DESCRIPTOR
        Partial serialize descriptor.
      • PARTIAL_SERIALIZE_SIGNATURE

        public static final String PARTIAL_SERIALIZE_SIGNATURE
        Partial serialize signature. Extracted from ASMifier.
        See Also:
        Constant Field Values
    • Method Detail

      • generateSerializeMethod

        public static void generateSerializeMethod​(org.objectweb.asm.ClassVisitor cv,
                                                   org.objectweb.asm.Type classType,
                                                   String parentInternalName,
                                                   Set<Property> fields)
        Generate serialize method
        Parameters:
        classType - Class type being created
        parentInternalName - Internal name of parent class
        cv - Class visitor used for method generation.
        fields - Fields to serialize
      • generateDeserializeMethod

        public static void generateDeserializeMethod​(org.objectweb.asm.ClassVisitor cv,
                                                     org.objectweb.asm.Type classType,
                                                     String parentInternalName,
                                                     Set<Property> fields)
        Generate deserialize method
        Parameters:
        classType - Class type being created
        parentInternalName - Internal name of parent class
        cv - Class visitor used for method generation.
        fields - Fields to deserialize
      • findWrapperType

        public static Tuple<org.objectweb.asm.Type,​org.objectweb.asm.Type> findWrapperType​(String javaTypeName,
                                                                                                 String javaTypeDescriptor)
        Find wrapper type that must wrap the type with name provided
        Parameters:
        javaTypeName - Java type name to wrap
        javaTypeDescriptor - Java type descriptor
        Returns:
        Wrapper type and 'actual' java type for constructor