Top Inners Fields Constructors Methods
org.eclipse.jetty.websocket.core.util

public Class ReflectUtils

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.invoke.MethodType, java.lang.reflect.Constructor, .Method, .Modifier, .ParameterizedType, .Type, .TypeVariable, java.util.ArrayList, .List, java.util.regex.Pattern, java.util.stream.Stream, org.eclipse.jetty.websocket.core.exception.DuplicateAnnotationException

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Pattern
private static final Pattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
append(StringBuilder str, Class<?> pojo, Method method)

public static void
public static void
append(StringBuilder str, MethodType methodType)

private static StringBuilder
appendTypeName(StringBuilder sb, Type type, boolean ellipses)

public static Method
findAnnotatedMethod(Class<?> pojo, Class<? extends Annotation> anno)

public static Method[]
findAnnotatedMethods(Class<?> pojo, Class<? extends Annotation> anno)

public static Class<?>

Returns:

the (concrete) generic class that the interface exposes
findGenericClassFor
(Class<?>
the base (concrete) class to look in
baseClass
,
Class<?>
the interface of interest
ifaceClass
)

Given a Base (concrete) Class, find the interface specified, and return its concrete Generic class declaration.

public static Method
findMethod(Class<?> pojo, String methodName, Class<?>... params)

private static int
public static boolean
private static boolean
private static boolean
public static String
toString(Class<?> pojo, Method method)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JAKARTA_CLASSNAME_PATTERNback to summary
private static final Pattern JAKARTA_CLASSNAME_PATTERN
JAVAX_CLASSNAME_PATTERNback to summary
private static final Pattern JAVAX_CLASSNAME_PATTERN

Constructor Detail

ReflectUtilsback to summary
public ReflectUtils()

Method Detail

appendback to summary
public static void append(StringBuilder str, Class<?> pojo, Method method)
appendback to summary
public static void append(StringBuilder str, Method method)
appendback to summary
public static void append(StringBuilder str, MethodType methodType)
appendTypeNameback to summary
private static StringBuilder appendTypeName(StringBuilder sb, Type type, boolean ellipses)
findAnnotatedMethodback to summary
public static Method findAnnotatedMethod(Class<?> pojo, Class<? extends Annotation> anno)
findAnnotatedMethodsback to summary
public static Method[] findAnnotatedMethods(Class<?> pojo, Class<? extends Annotation> anno)
findGenericClassForback to summary
public static Class<?> findGenericClassFor(Class<?> baseClass, Class<?> ifaceClass)

Given a Base (concrete) Class, find the interface specified, and return its concrete Generic class declaration.

Parameters
baseClass:Class<?>

the base (concrete) class to look in

ifaceClass:Class<?>

the interface of interest

Returns:Class<?>

the (concrete) generic class that the interface exposes

findMethodback to summary
public static Method findMethod(Class<?> pojo, String methodName, Class<?>... params)
findTypeParameterIndexback to summary
private static int findTypeParameterIndex(Class<?> clazz, TypeVariable<?> needVar)
isDefaultConstructableback to summary
public static boolean isDefaultConstructable(Class<?> clazz)
resolveGenericRefback to summary
private static boolean resolveGenericRef(ReflectUtils.GenericRef ref, Class<?> clazz, Type type)
resolveGenericRefback to summary
private static boolean resolveGenericRef(ReflectUtils.GenericRef ref, Type type)
toStringback to summary
public static String toString(Class<?> pojo, Method method)
org.eclipse.jetty.websocket.core.util back to summary

private Class ReflectUtils.GenericRef

extends Object
Class Inheritance
  • java.lang.Object
  • org.eclipse.jetty.websocket.core.util.ReflectUtils.GenericRef

Field Summary

Modifier and TypeField and Description
private final Class<?>
pack-priv Class<?>
private int
public Type
private final Class<?>

Constructor Summary

AccessConstructor and Description
public
GenericRef(final Class<?> baseClass, final Class<?> ifaceClass)

Method Summary

Modifier and TypeMethod and Description
public boolean
public void
setGenericFromType(Type type, int index)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

baseClassback to summary
private final Class<?> baseClass
genericClassback to summary
pack-priv Class<?> genericClass
genericIndexback to summary
private int genericIndex
genericTypeback to summary
public Type genericType
ifaceClassback to summary
private final Class<?> ifaceClass

Constructor Detail

GenericRefback to summary
public GenericRef(final Class<?> baseClass, final Class<?> ifaceClass)

Method Detail

needsUnwrapback to summary
public boolean needsUnwrap()
setGenericFromTypeback to summary
public void setGenericFromType(Type type, int index)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override