Top Fields Constructors Methods
org.apache.sshd.common.util

public final Class ReflectionUtils

extends Object
Class Inheritance
Imports
java.lang.reflect.Constructor, .Field, java.util.Collection, java.util.function.Function, .Predicate

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final Function<Field, String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Collection<Field>
getMatchingDeclaredFields(Class<?> clazz, Predicate<? super Field> acceptor)

public static Collection<Field>
getMatchingFields(Class<?> clazz, Predicate<? super Field> acceptor)

public static boolean

Returns:

true if the class loader can load the class, false otherwise
isClassAvailable
(ClassLoader
ClassLoader to use
cl
,
String
to check
className
)
Deprecated The preferred method is org.apache.sshd.common.util.threads.ThreadUtils#resolveDefaultClass(Class, String) which checks all possible ClassLoaders.

Checks whether a given ClassLoader can load a class.

public static Object
newInstance(Class<?> clazz)

public static <T> T
newInstance(Class<?> clazz, Class<? extends T> castType)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FIELD_NAME_EXTRACTORback to summary
public static final Function<Field, String> FIELD_NAME_EXTRACTOR

Constructor Detail

ReflectionUtilsback to summary
private ReflectionUtils()

Method Detail

getMatchingDeclaredFieldsback to summary
public static Collection<Field> getMatchingDeclaredFields(Class<?> clazz, Predicate<? super Field> acceptor)
getMatchingFieldsback to summary
public static Collection<Field> getMatchingFields(Class<?> clazz, Predicate<? super Field> acceptor)
isClassAvailableback to summary
public static boolean isClassAvailable(ClassLoader cl, String className)

Deprecated

The preferred method is org.apache.sshd.common.util.threads.ThreadUtils#resolveDefaultClass(Class, String) which checks all possible ClassLoaders.

Checks whether a given ClassLoader can load a class.

Parameters
cl:ClassLoader

ClassLoader to use

className:String

to check

Returns:boolean

true if the class loader can load the class, false otherwise

Annotations
@Deprecated
newInstanceback to summary
public static Object newInstance(Class<?> clazz) throws ReflectiveOperationException
newInstanceback to summary
public static <T> T newInstance(Class<?> clazz, Class<? extends T> castType) throws ReflectiveOperationException
Annotations
@SuppressWarnings:checkstyle:ThrowsCount