org.jboss.webbeans.util
Class Names

java.lang.Object
  extended by org.jboss.webbeans.util.Names

public class Names
extends java.lang.Object

Utility class to produce friendly names e.g. for debugging

Author:
Pete Muir

Constructor Summary
Names()
           
 
Method Summary
static java.lang.String annotationsToString(java.util.Set<java.lang.annotation.Annotation> annotations)
           
static java.lang.String annotationToString(java.lang.annotation.Annotation annotation)
          Gets a string representation from an annotation
static java.lang.String classToString(java.lang.Class<?> clazz)
          Gets a string representation from a class
static java.lang.String constructorToString(java.lang.reflect.Constructor<?> constructor)
          Gets a string representation from a method
static int count(java.lang.Iterable<?> iterable)
          Counts item in an iteratble
static java.lang.String fieldToString(java.lang.reflect.Field field)
          Gets a string representation from a field
static java.lang.String methodToString(java.lang.reflect.Method method)
          Gets the string representation from a method
static java.lang.String scopeTypeToString(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
          Gets a string representation of the scope type annotation
static java.lang.String typesToString(java.util.Set<? extends java.lang.reflect.Type> types)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Names

public Names()
Method Detail

scopeTypeToString

public static java.lang.String scopeTypeToString(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Gets a string representation of the scope type annotation

Parameters:
scopeType - The scope type
Returns:
A string representation

count

public static int count(java.lang.Iterable<?> iterable)
Counts item in an iteratble

Parameters:
iterable - The iteraboe
Returns:
The count

fieldToString

public static java.lang.String fieldToString(java.lang.reflect.Field field)
Gets a string representation from a field

Parameters:
field - The field
Returns:
The string representation

methodToString

public static java.lang.String methodToString(java.lang.reflect.Method method)
Gets the string representation from a method

Parameters:
method - The method
Returns:
The string representation

annotationToString

public static java.lang.String annotationToString(java.lang.annotation.Annotation annotation)
Gets a string representation from an annotation

Parameters:
annotation - The annotation
Returns:
The string representation

constructorToString

public static java.lang.String constructorToString(java.lang.reflect.Constructor<?> constructor)
Gets a string representation from a method

Parameters:
constructor - The method
Returns:
The string representation

classToString

public static java.lang.String classToString(java.lang.Class<?> clazz)
Gets a string representation from a class

Parameters:
clazz - The class
Returns:
The string representation

typesToString

public static java.lang.String typesToString(java.util.Set<? extends java.lang.reflect.Type> types)

annotationsToString

public static java.lang.String annotationsToString(java.util.Set<java.lang.annotation.Annotation> annotations)


Copyright © 2011. All Rights Reserved.