Interface SignatureCodec

All Known Implementing Classes:
SignatureCodecVersion1

public interface SignatureCodec
A signature codec is responsible for encoding and decoding of inferred returned types as stored in bytecode. The signature must contain an appropriate version number so that future versions of Groovy remain capable of decoding previous versions.
  • Method Details

    • encode

      String encode(ClassNode node)
      Encodes node as the inferred-signature string stored on TypeChecked.TypeCheckingInfo.
      Parameters:
      node - the inferred return type
      Returns:
      the encoded signature
    • decode

      ClassNode decode(String signature)
      Decodes a signature produced by encode(ClassNode).
      Parameters:
      signature - the encoded return type
      Returns:
      the decoded class node