Class ReflectUtils
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.util.ReflectUtils
-
public class ReflectUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classReflectUtils.GenericRef
-
Constructor Summary
Constructors Constructor Description ReflectUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringBuilderappendTypeName(java.lang.StringBuilder sb, java.lang.reflect.Type type, boolean ellipses)static java.lang.Class<?>findGenericClassFor(java.lang.Class<?> baseClass, java.lang.Class<?> ifaceClass)Given a Base (concrete) Class, find the interface specified, and return its concrete Generic class declaration.private static intfindTypeParameterIndex(java.lang.Class<?> clazz, java.lang.reflect.TypeVariable<?> needVar)static booleanisDefaultConstructable(java.lang.Class<?> clazz)private static booleanresolveGenericRef(ReflectUtils.GenericRef ref, java.lang.Class<?> clazz, java.lang.reflect.Type type)private static booleanresolveGenericRef(ReflectUtils.GenericRef ref, java.lang.reflect.Type type)static java.lang.StringtoShortName(java.lang.reflect.Type type)static java.lang.StringtoString(java.lang.Class<?> pojo, java.lang.reflect.Method method)static java.lang.StringtrimClassName(java.lang.String name)
-
-
-
Method Detail
-
appendTypeName
private static java.lang.StringBuilder appendTypeName(java.lang.StringBuilder sb, java.lang.reflect.Type type, boolean ellipses)
-
findGenericClassFor
public static java.lang.Class<?> findGenericClassFor(java.lang.Class<?> baseClass, java.lang.Class<?> ifaceClass)Given a Base (concrete) Class, find the interface specified, and return its concrete Generic class declaration.- Parameters:
baseClass- the base (concrete) class to look inifaceClass- the interface of interest- Returns:
- the (concrete) generic class that the interface exposes
-
findTypeParameterIndex
private static int findTypeParameterIndex(java.lang.Class<?> clazz, java.lang.reflect.TypeVariable<?> needVar)
-
isDefaultConstructable
public static boolean isDefaultConstructable(java.lang.Class<?> clazz)
-
resolveGenericRef
private static boolean resolveGenericRef(ReflectUtils.GenericRef ref, java.lang.Class<?> clazz, java.lang.reflect.Type type)
-
resolveGenericRef
private static boolean resolveGenericRef(ReflectUtils.GenericRef ref, java.lang.reflect.Type type)
-
toShortName
public static java.lang.String toShortName(java.lang.reflect.Type type)
-
toString
public static java.lang.String toString(java.lang.Class<?> pojo, java.lang.reflect.Method method)
-
trimClassName
public static java.lang.String trimClassName(java.lang.String name)
-
-