- MAX_DEFAULT - Static variable in annotation type org.coodex.mock.Mock.Dimension
-
- MAX_WEIGHT - Static variable in annotation type org.coodex.mock.Mock.Number
-
- MIN_DEFAULT - Static variable in annotation type org.coodex.mock.Mock.Dimension
-
- MobilePhoneNum - Annotation Type in org.coodex.mock.ext
-
- Mock - Annotation Type in org.coodex.mock
-
用来修饰定制的模拟器注解,例如:
- mock(Class<T>, Annotation...) - Static method in class org.coodex.mock.Mocker
-
- mock(Type, Type, Annotation...) - Static method in class org.coodex.mock.Mocker
-
- mock(Class<T>, Annotation...) - Method in interface org.coodex.mock.MockerProvider
-
- mock(Type, Type, Annotation...) - Method in interface org.coodex.mock.MockerProvider
-
- mock(A, Mock.Nullable, Type) - Method in interface org.coodex.mock.TypeMocker
-
根据mockAnnotation和目标类型
- Mock.Assignation - Annotation Type in org.coodex.mock
-
用来指定第三方pojo的模拟器设置。
- Mock.Boolean - Annotation Type in org.coodex.mock
-
布尔单值模拟器,支持类型:
boolean, Boolean: 布尔值 true, false
byte, int, short, long及其包装类: 默认true - 1; false - 0,可通过intTrue和intFalse更改
char及其包装类: 默认 true - T; false - F,可通过charTrue和charFalse更改
String: 默认true - "true"; false - "false",可通过strTrue, strFalse更改
- Mock.Char - Annotation Type in org.coodex.mock
-
模拟字符。
- Mock.Declaration - Annotation Type in org.coodex.mock
-
用来修饰模拟器声明配置信息,声明模拟器的方式有两种,优先级如下:
如果配置信息的属性的值类型是`@Mock`修饰的,则以此属性名为key,以此属性值声明上下文模拟器,
这种方式主要用于公用类,可以将共用类中明确类型的需要被注入的模拟器逐一定义出来,
开发者根据实际情况指定模拟器即可
属性上有`@Mock`修饰的注解时,则以此属性名为`key`,以此属性上的注解声明上下文模拟器,
适用于共用类中,属性类型不明确的,由开发者在外层根据具体情况指定将用到的模拟器
- Mock.Depth - Annotation Type in org.coodex.mock
-
相同类型模拟的深度,比如
- Mock.Designated - Annotation Type in org.coodex.mock
-
使用指定`json`文件模拟数据,优先级最高
- Mock.Dimension - Annotation Type in org.coodex.mock
-
用来定义多维(含一维)集合、数组的维度模拟信息,确定各维度的数组大小
- Mock.Dimensions - Annotation Type in org.coodex.mock
-
定义多维集合、数组各个维度的模拟配置
- Mock.Inject - Annotation Type in org.coodex.mock
-
用来修饰属性,注入上下文中的模拟器
重名的模拟器优先级上:
在集合、数组的属性模拟上,上下文中同名的序列模拟器优先级高于其他单值模拟器
多个相同类型(单值并且与当前需要模拟的类型匹配的、序列)模拟器,就近原则,越靠近将要模拟的属性则越优先
- Mock.Key - Annotation Type in org.coodex.mock
-
用于修饰Map的键模拟器的注解
- Mock.NotFound - Enum in org.coodex.mock
-
当需要注入的模拟器找不到时如何处理
- Mock.Nullable - Annotation Type in org.coodex.mock
-
单值模拟时,是否模拟null
对基础类型无效
- Mock.Number - Annotation Type in org.coodex.mock
-
数据单值模拟器,支持类型:byte, short, int, long, float, double及其包装类
- Mock.Relation - Annotation Type in org.coodex.mock
-
用来指定pojo的关联模拟策略,也就是被修饰的属性可以根据所依赖的属性值进行运算,最大可能保障模拟数据的真实性
- Mock.Sequence - Annotation Type in org.coodex.mock
-
定义一个序列模拟器
- Mock.Sequences - Annotation Type in org.coodex.mock
-
定义一组序列模拟器
- Mock.String - Annotation Type in org.coodex.mock
-
字符串模拟配置
模拟配置优先级:
- txtResource() 存在且有内容时,在资源文件行中模拟
- range() 非0长字符串,在range范围内模拟
- charCodeSet() 非0元素宿数组时,结合minLength,maxLength模拟
- 默认,'0'-'9','A'-'Z','a'-'z'范围内,结合minLength,maxLength模拟
- Mock.Value - Annotation Type in org.coodex.mock
-
用于修饰Map的值模拟器的注解
- Mocker - Class in org.coodex.mock
-
- MockerProvider - Interface in org.coodex.mock
-
- MockException - Exception in org.coodex.mock
-
- MockException(String) - Constructor for exception org.coodex.mock.MockException
-
- MockException(String, Throwable) - Constructor for exception org.coodex.mock.MockException
-
- mockMethod(Method) - Static method in class org.coodex.mock.Mocker
-
- mockMethod(Method, Type) - Static method in class org.coodex.mock.Mocker
-
- mockParameter(Method, int) - Static method in class org.coodex.mock.Mocker
-
- mockParameter(Method, int, Type) - Static method in class org.coodex.mock.Mocker
-
- Value() - Constructor for class org.coodex.mock.ext.Coordinates.Value
-
- valueOf(String) - Static method in enum org.coodex.mock.CharCodeSet
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.coodex.mock.ext.Coordinates.Dimension
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.coodex.mock.ext.IdCard.Sex
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.coodex.mock.ext.IdCard.Specification
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.coodex.mock.ext.IpAddress.Type
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.coodex.mock.ext.VehicleNum.Province
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.coodex.mock.Mock.NotFound
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum org.coodex.mock.CharCodeSet
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- values() - Static method in enum org.coodex.mock.ext.Coordinates.Dimension
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- values() - Static method in enum org.coodex.mock.ext.IdCard.Sex
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- values() - Static method in enum org.coodex.mock.ext.IdCard.Specification
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- values() - Static method in enum org.coodex.mock.ext.IpAddress.Type
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- values() - Static method in enum org.coodex.mock.ext.VehicleNum.Province
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- values() - Static method in enum org.coodex.mock.Mock.NotFound
-
Returns an array containing the constants of this enum type, in
the order they are declared.
- VehicleNum - Annotation Type in org.coodex.mock.ext
-
- VehicleNum.Province - Enum in org.coodex.mock.ext
-