01: package org.vraptor.annotations;
02:
03: import java.lang.annotation.Documented;
04: import java.lang.annotation.ElementType;
05: import java.lang.annotation.Retention;
06: import java.lang.annotation.RetentionPolicy;
07: import java.lang.annotation.Target;
08:
09: import org.vraptor.scope.ScopeType;
10:
11: /**
12: * Field outjection: describes a field as to be outjected after logic execution.
13: * It also could be used to outject the return object of a method.
14: *
15: * @author Guilherme Silveira
16: */
17: @Target({ElementType.FIELD,ElementType.METHOD})
18: @Documented
19: @Retention(value=RetentionPolicy.RUNTIME)
20: public @interface Out {
21: /**
22: * Which scope should be used to outject the object
23: *
24: * @return scope
25: */
26: public ScopeType scope() default ScopeType.REQUEST;
27:
28: /**
29: * Uses the field name if no value is provided
30: *
31: * @return default value is the field name itself
32: */
33: public String key() default "";
34: }
|