org.test4j.module.core.utility
类 ModuleHelper
java.lang.Object
org.test4j.module.core.utility.ModuleHelper
public class ModuleHelper
- extends Object
|
方法摘要 |
static Map<Class<? extends Annotation>,Map<String,String>> |
getAnnotationPropertyDefaults(Class<? extends Module> moduleClass,
Class<? extends Annotation>... annotationClasses)
Returns an object that represents the default values for the properties
of the given annotations and the given module. |
static Class |
getClassValueReplaceDefault(Class<? extends Annotation> annotation,
String annotationPropertyName,
Class value,
Map<Class<? extends Annotation>,Map<String,String>> allDefaultValues,
Class defaultValueClass)
Replaces default enum value with the given default enum value. |
static
|
getEnumValueReplaceDefault(Class<? extends Annotation> annotation,
String annotationPropertyName,
T enumValue,
Map<Class<? extends Annotation>,Map<String,String>> allDefaultValues)
Replaces default enum value with the given default enum value. |
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_ENUM_VALUE_NAME
public static final String DEFAULT_ENUM_VALUE_NAME
- The default name of the default enum value.
- 另请参见:
- 常量字段值
ModuleHelper
public ModuleHelper()
getAnnotationPropertyDefaults
public static Map<Class<? extends Annotation>,Map<String,String>> getAnnotationPropertyDefaults(Class<? extends Module> moduleClass,
Class<? extends Annotation>... annotationClasses)
- Returns an object that represents the default values for the properties
of the given annotations and the given module.
- 参数:
moduleClass - The class of the module for which we want the default
annotation property valuesconfiguration - The test4j configurationannotationClasses - The annotations for which we want the default
values
- 返回:
- An object that returns the annotation property default values
getEnumValueReplaceDefault
public static <T extends Enum<?>> T getEnumValueReplaceDefault(Class<? extends Annotation> annotation,
String annotationPropertyName,
T enumValue,
Map<Class<? extends Annotation>,Map<String,String>> allDefaultValues)
- Replaces default enum value with the given default enum value. If
enumValue contains the value
DEFAULT_ENUM_VALUE_NAME the
defaultValue will be returned otherwise the enumValue itself will be
returned.
- 参数:
annotation - the annotation, not nullannotationPropertyName - the name of the annotation propertyenumValue - the value to check, not nullallDefaultValues - the map with values to return in case of a
default, not null
- 返回:
- the enumValue or the defaultValue in case of a default
getClassValueReplaceDefault
public static Class getClassValueReplaceDefault(Class<? extends Annotation> annotation,
String annotationPropertyName,
Class value,
Map<Class<? extends Annotation>,Map<String,String>> allDefaultValues,
Class defaultValueClass)
- Replaces default enum value with the given default enum value. If
enumValue contains the value
DEFAULT_ENUM_VALUE_NAME the
defaultValue will be returned otherwise the enumValue itself will be
returned.
- 参数:
annotation - the annotation, not nullannotationPropertyName - the name of the annotation propertyvalue - the value to check, not nullallDefaultValues - the map with values to return in case of a
default, not nulldefaultValueClass - the name of the default value
- 返回:
- the enumValue or the defaultValue in case of a default
Copyright © 2013. All rights reserved.