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 annotation2String(java.lang.annotation.Annotation annotation)
          Gets a string representation from an annotation
static java.lang.String annotations2String(java.lang.annotation.Annotation[] annotations)
          Gets a string representation from an array of annotations
static java.lang.String class2String(java.lang.Class<?> clazz)
          Gets a string representation from a class
static java.lang.String constructor2String(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 field2String(java.lang.reflect.Field field)
          Gets a string representation from a field
static java.lang.String method2String(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 type2String(java.lang.Class<?> clazz)
          Gets a string representation from a type
 
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

annotations2String

public static java.lang.String annotations2String(java.lang.annotation.Annotation[] annotations)
Gets a string representation from an array of annotations

Parameters:
annotations - The annotations
Returns:
The string representation

field2String

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

Parameters:
field - The field
Returns:
The string representation

method2String

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

Parameters:
method - The method
Returns:
The string representation

annotation2String

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

Parameters:
annotation - The annotation
Returns:
The string representation

constructor2String

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

Parameters:
constructor - The method
Returns:
The string representation

type2String

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

Parameters:
clazz - The type
Returns:
The string representation

class2String

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

Parameters:
clazz - The class
Returns:
The string representation


Copyright © 2008. All Rights Reserved.