-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBean.java
More file actions
31 lines (24 loc) · 930 Bytes
/
Copy pathBean.java
File metadata and controls
31 lines (24 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package tamaized.beanification;
import net.neoforged.api.distmarker.Dist;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotated static methods will automatically be invoked and the returned object will be registered to {@link tamaized.beanification.BeanContext}.<p/>
*
* The returned object class can extend/implement the method return type. The method return type is what's used for bean identification.<br/>
* This for example allows for interfaces to be used as beans.<p/>
*
* Parameters must be annotated with {@link Autowired} or {@link Directory}
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Bean {
/**
* Used to create a named bean.
*/
String value() default Component.DEFAULT_VALUE;
Dist[] dist() default {};
int priority() default 0;
}