Class CTDecoder

  • All Implemented Interfaces:
    Constants

    public final class CTDecoder
    extends Decoder
    This class decodes Java bytecodes into ShrikeBT code using a ShrikeCT class reader.
    • Constructor Detail

      • CTDecoder

        public CTDecoder​(CodeReader r)
                  throws java.lang.NullPointerException
        Decode the code resource 'r'.
        Throws:
        java.lang.NullPointerException - if r is null
      • CTDecoder

        public CTDecoder​(CodeReader r,
                         ConstantPoolReader cpr)
                  throws java.lang.NullPointerException
        Decode the code resource 'r' using the predeclared constant pool reader 'cpr' (obtained by makeConstantPoolReader below).
        Throws:
        java.lang.NullPointerException - if r is null
    • Method Detail

      • convertClassToType

        public static java.lang.String convertClassToType​(java.lang.String s)
        Convert the internal JVM class name to a JVM type name (e.g., java/lang/Object to Ljava/lang/Object;).
        Throws:
        java.lang.IllegalArgumentException - if s is null
      • makeConstantPoolReader

        public static ConstantPoolReader makeConstantPoolReader​(ClassReader cr)
                                                         throws java.lang.IllegalArgumentException
        Build a ConstantPoolReader implementation to read the constant pool from 'cr'.
        Throws:
        java.lang.IllegalArgumentException