Package org.apache.sshd.common.util
Class ReflectionUtils
- java.lang.Object
-
- org.apache.sshd.common.util.ReflectionUtils
-
public final class ReflectionUtils extends Object
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static Function<Field,String>
FIELD_NAME_EXTRACTOR
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Collection<Field>
getMatchingDeclaredFields(Class<?> clazz, Predicate<? super Field> acceptor)
static Collection<Field>
getMatchingFields(Class<?> clazz, Predicate<? super Field> acceptor)
static boolean
isClassAvailable(ClassLoader cl, String className)
Deprecated.The preferred method isThreadUtils.resolveDefaultClass(Class, String)
which checks all possible ClassLoaders.static Object
newInstance(Class<?> clazz)
static <T> T
newInstance(Class<?> clazz, Class<? extends T> castType)
-
-
-
Method Detail
-
getMatchingFields
public static Collection<Field> getMatchingFields(Class<?> clazz, Predicate<? super Field> acceptor)
-
getMatchingDeclaredFields
public static Collection<Field> getMatchingDeclaredFields(Class<?> clazz, Predicate<? super Field> acceptor)
-
isClassAvailable
@Deprecated public static boolean isClassAvailable(ClassLoader cl, String className)
Deprecated.The preferred method isThreadUtils.resolveDefaultClass(Class, String)
which checks all possible ClassLoaders.- Parameters:
cl
-className
-- Returns:
-
newInstance
public static Object newInstance(Class<?> clazz) throws ReflectiveOperationException
- Throws:
ReflectiveOperationException
-
newInstance
public static <T> T newInstance(Class<?> clazz, Class<? extends T> castType) throws ReflectiveOperationException
- Throws:
ReflectiveOperationException
-
-