Java Type Convert typeToJavaCode(Class type)

Here you can find the source of typeToJavaCode(Class type)

Description

type To Java Code

License

Apache License

Declaration

public static String typeToJavaCode(Class<?> type) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String typeToJavaCode(Class<?> type) {
        if (type.isArray()) {
            return type.getComponentType().getName() + "[]";
        } else {//from  w ww .  ja v  a 2s .co  m
            return type.getName();
        }
    }
}

Related

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