org.apache.ftpserver.util
Class ConfigurationClassUtils
java.lang.Object
org.apache.ftpserver.util.ConfigurationClassUtils
public class ConfigurationClassUtils
- extends java.lang.Object
Method Summary |
static java.lang.Object |
cast(java.lang.Class<?> clazz,
java.lang.String value)
|
static java.lang.Object |
createBean(Configuration config,
java.lang.String defaultClass)
|
static java.util.Map<?,?> |
createMap(Configuration config)
|
static boolean |
extendsClass(java.lang.Class<?> clazz,
java.lang.String className)
Checks if a class is a subclass of a class with the specified name. |
static void |
invokeMethod(java.lang.Object target,
java.lang.String methodName)
|
static java.lang.String |
normalizePropertyName(java.lang.String propertyName)
|
static void |
setProperty(java.lang.Object target,
java.lang.String propertyName,
java.lang.Object propertyValue)
|
static void |
setProperty(java.lang.Object target,
java.lang.String propertyName,
java.lang.String propertyValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationClassUtils
public ConfigurationClassUtils()
setProperty
public static void setProperty(java.lang.Object target,
java.lang.String propertyName,
java.lang.String propertyValue)
setProperty
public static void setProperty(java.lang.Object target,
java.lang.String propertyName,
java.lang.Object propertyValue)
normalizePropertyName
public static java.lang.String normalizePropertyName(java.lang.String propertyName)
createMap
public static java.util.Map<?,?> createMap(Configuration config)
createBean
public static java.lang.Object createBean(Configuration config,
java.lang.String defaultClass)
invokeMethod
public static void invokeMethod(java.lang.Object target,
java.lang.String methodName)
cast
public static java.lang.Object cast(java.lang.Class<?> clazz,
java.lang.String value)
extendsClass
public static boolean extendsClass(java.lang.Class<?> clazz,
java.lang.String className)
- Checks if a class is a subclass of a class with the specified name.
Used as an instanceOf without having to load the class, useful when
trying to check for classes that might not be available in the runtime
JRE.
- Parameters:
clazz
- The class to checkclassName
- The class name to look for in the super classes
- Returns:
- true if the class extends a class by the specified name.
Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.