KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jodd > madvoc > interceptor > ScopeType


1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved.
2

3 package jodd.madvoc.interceptor;
4
5 /**
6  * Parameters scope for injection ({@link jodd.madvoc.meta.In}) and outjection ({@link jodd.madvoc.meta.Out}).
7  */

8 public enum ScopeType {
9     PARAM(1),
10     REQUEST(2),
11     SESSION(3),
12     APPLICATION(4),
13     CONTEXT(5);
14
15     private int value;
16
17     ScopeType(int value) {
18         this.value = value;
19     }
20
21     public int value() {
22         return value;
23     }
24
25     public String JavaDoc toString() {
26         switch(value) {
27             case 1: return "Param";
28             case 2: return "Request";
29             case 3: return "Session";
30             case 4: return "Application";
31             case 5: return "Context";
32         }
33         return null;
34     }
35 }
36
Popular Tags