org.glassfish.hk2.utilities.reflection
Class Pretty

java.lang.Object
  extended by org.glassfish.hk2.utilities.reflection.Pretty

public class Pretty
extends java.lang.Object

Author:
jwells

Constructor Summary
Pretty()
           
 
Method Summary
static java.lang.String array(java.lang.Object[] array)
           
static java.lang.String clazz(java.lang.Class<?> clazz)
          Makes a nice, pretty class (without the package name)
static java.lang.String collection(java.util.Collection<?> collection)
           
static java.lang.String constructor(java.lang.reflect.Constructor<?> constructor)
          Make a nice pretty string out of the constructor and all its parameters
static java.lang.String field(java.lang.reflect.Field field)
           
static java.lang.String method(java.lang.reflect.Method method)
          Makes a nice pretty string of the method, with the method name and all parameters
static java.lang.String pType(java.lang.reflect.ParameterizedType pType)
          Prints a pretty parameterized type
static java.lang.String type(java.lang.reflect.Type t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pretty

public Pretty()
Method Detail

clazz

public static java.lang.String clazz(java.lang.Class<?> clazz)
Makes a nice, pretty class (without the package name)

Parameters:
clazz - Make me a pretty class
Returns:
A nice string of the class, with no package

pType

public static java.lang.String pType(java.lang.reflect.ParameterizedType pType)
Prints a pretty parameterized type

Parameters:
pType - The parameterized type to print. May not be null
Returns:
A pretty string version of the parameterized type

type

public static java.lang.String type(java.lang.reflect.Type t)

constructor

public static java.lang.String constructor(java.lang.reflect.Constructor<?> constructor)
Make a nice pretty string out of the constructor and all its parameters

Parameters:
constructor - The constructor to make pretty
Returns:
A nice pretty string

method

public static java.lang.String method(java.lang.reflect.Method method)
Makes a nice pretty string of the method, with the method name and all parameters

Parameters:
method - The method to make pretty
Returns:
A nice pretty string

field

public static java.lang.String field(java.lang.reflect.Field field)

array

public static java.lang.String array(java.lang.Object[] array)

collection

public static java.lang.String collection(java.util.Collection<?> collection)


Copyright © 2013 Oracle Corporation. All Rights Reserved.