Java Type Convert typeToSignature(String className)

Here you can find the source of typeToSignature(String className)

Description

Converts class name ("foo.Bar") to signature ("foo/bar").

License

Open Source License

Declaration

public static String typeToSignature(String className) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*  w ww.  j  a  v a 2s . c  om*/
     * Converts class name ("foo.Bar") to signature ("foo/bar").
     */
    public static String typeToSignature(String className) {
        return className.replace('.', '/');
    }

    /**
     * Converts class name ("foo.Bar") to asm name ("foo/bar").
     */
    public static String typeToSignature(Class type) {
        return type.getName().replace('.', '/');
    }
}

Related

  1. typeToClass(Class type)
  2. typeToFilename(String var)
  3. typeToHex(byte buffer[])
  4. typeToInt(String type)
  5. typeToJavaCode(Class type)
  6. typeToSignature(String type)
  7. typeToSimpleName(String typeName)
  8. TypeToString(int typeNum)
  9. typeToString(Object o)