print Class Metadata - Java Reflection

Java examples for Reflection:Class

Description

print Class Metadata

Demo Code


//package com.java2s;

import static java.lang.System.out;

public class Main {
    public static void printClassMetadata(Class<?> c) {
        String className = c.getCanonicalName();
        out.format("Class => %s", className);
        out.format("%n");
    }//  w ww  .  j  a va  2s . c  o  m
}

Related Tutorials