
net.cassite.pure.ioc.annotations.Use Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pure.ioc Show documentation
Show all versions of pure.ioc Show documentation
Lightweight type and annotation based dependency injection framework
The newest version!
package net.cassite.pure.ioc.annotations;
import java.lang.annotation.*;
/**
* Force a setter or one of method's parameter to use the given class's instance
* / constant / variable.
* It's similar to Force but it is not limited to primitives or Strings.
* Constants and variables can be registered in IOCController
*
* @author wkgcass
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Inherited
public @interface Use {
/**
* use instance of designated class
*
* @return class
*/
@SuppressWarnings("rawtypes") Class cls() default Use.class;
/**
* use instance registered in scope
*
* @return name
*/
String value() default "";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy