Class Signatures

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

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

    Modifier and Type Method Description
    static String classDescriptor​(com.sun.tools.javac.code.Type type, com.sun.tools.javac.code.Types types)
    Returns the binary names of the class.
    static String descriptor​(com.sun.tools.javac.code.Type type, com.sun.tools.javac.code.Types types)
    Returns a JVMS 4.3.3 method descriptor.
    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.
    static String prettyType​(com.sun.tools.javac.code.Type type)
    Pretty-prints a Type for use in diagnostics, using simple names for class types

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • classDescriptor

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

      public static String descriptor​(com.sun.tools.javac.code.Type type, com.sun.tools.javac.code.Types types)
      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