get Full Class Name - Java Reflection

Java examples for Reflection:Class

Description

get Full Class Name

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        Class classInstance = String.class;
        System.out.println(getFullClassName(classInstance));
    }/* w w  w  .  ja  v a  2 s . c o  m*/

    public static String getFullClassName(Class<?> classInstance) {

        String name = classInstance.getName();
        return name;
    }
}

Related Tutorials