Class MethodDef

java.lang.Object
dev.quantumfusion.hyphen.codegen.def.MethodDef
All Implemented Interfaces:
SerializerDef
Direct Known Subclasses:
ClassDef, EnumDef, IndexedDef, MapDef, SetDef, SubclassDef

public abstract class MethodDef extends Object implements SerializerDef
  • Field Details

  • Constructor Details

  • Method Details

    • scan

      public abstract void scan(SerializerHandler<?,​?> handler, Clazz clazz)
    • writeMethodPut

      protected abstract void writeMethodPut(MethodHandler mh, Runnable valueLoad)
    • writeMethodGet

      protected abstract void writeMethodGet(MethodHandler mh)
    • writeMethodMeasure

      protected abstract void writeMethodMeasure(MethodHandler mh, Runnable valueLoad)
    • writePut

      public void writePut(MethodHandler mh, Runnable valueLoad)
      Description copied from interface: SerializerDef
      Writes code for encoding the Clazz the definition is designed to handle.
      Specified by:
      writePut in interface SerializerDef
      Parameters:
      mh - A MethodHandler
      valueLoad - A Runnable which pushes the Clazz value onto the stack.
    • writeGet

      public void writeGet(MethodHandler mh)
      Description copied from interface: SerializerDef
      Writes code for decoding the Clazz the definition is designed to handle.
      Specified by:
      writeGet in interface SerializerDef
      Parameters:
      mh - A MethodHandler
    • writeMeasure

      public void writeMeasure(MethodHandler mh, Runnable valueLoad)
      Description copied from interface: SerializerDef
      Writes code for measuring the size required to encode the value
      Specified by:
      writeMeasure in interface SerializerDef
      Parameters:
      mh - A MethodHandler
      valueLoad - A Runnable which pushes the Clazz value onto the stack.
    • writeMethods

      public void writeMethods(CodegenHandler<?,​?> handler, CodegenHandler.MethodWriter writer, boolean spark)