![JAR search and dependency download from the Maven repository](/logo.png)
org.test4j.module.inject.Inject Maven / Gradle / Ivy
package org.test4j.module.inject;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target(FIELD)
@Retention(RUNTIME)
public @interface Inject {
/**
* mock对象要注入的目标,以当前testObject的字段名称表示
* 支持ongl表达
*
* @return
*/
String[] targets() default {};
/**
* mock对象要注入到目标对象的那个变量中
* 如果值为空或null,表示按类型方式注入
*
* @return
*/
String[] properties() default {};
/**
* 同时给对象赋值stub实例
*
* @return
*/
boolean stub() default false;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy