Class Signatures

java.lang.Object
com.google.errorprone.util.Signatures

public final class Signatures extends Object
Signature generation.
  • Method Details

    • classDescriptor

      public static String classDescriptor(com.sun.tools.javac.code.Type type, VisitorState state)
      Returns the binary names of the class.
    • descriptor

      public static String descriptor(com.sun.tools.javac.code.Type type, VisitorState state)
      Returns a JVMS 4.3.3 method descriptor.
    • prettyMethodSignature

      public static String prettyMethodSignature(com.sun.tools.javac.code.Symbol.ClassSymbol origin, com.sun.tools.javac.code.Symbol.MethodSymbol m)
      Pretty-prints a method signature for use in diagnostics.

      Uses simple names for declared types, and omitting formal type parameters and the return type since they do not affect overload resolution.

    • prettyType

      public static String prettyType(com.sun.tools.javac.code.Type type)
      Pretty-prints a Type for use in diagnostics, using simple names for class types