public class MockMapperFactory extends Object
| Constructor and Description |
|---|
MockMapperFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Object> |
getMapper(Class<?> type)
通过一个类的注解来生成映射
|
static Map<String,Object> |
getMapper(Class<?> type,
Map<String,Object> other)
通过一个类的注解来生成映射,然后再整合额外的指定参数
|
static Map.Entry<Supplier<Object>,String> |
getValue(MockArray mockArrayAnnotation)
通过注解MockValue类型来获取value值
|
static Map.Entry<Supplier<Object>,String> |
getValue(MockValue mockValueAnnotation)
通过注解MockValue类型来获取value值
如果为null或者值没有(保留空字符),则返回null
|
public static Map<String,Object> getMapper(Class<?> type, Map<String,Object> other)
type - 类型other - 额外参数,可以为nullpublic static Map<String,Object> getMapper(Class<?> type)
type - 类型public static Map.Entry<Supplier<Object>,String> getValue(MockValue mockValueAnnotation)
Entry<Supplier<Object>, fieldParam> , 返回一个entry,key为value中的值的获取函数,value为map映射中字段的区间参数值。Copyright © 2024. All rights reserved.