forked from actframework/actframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathC2.java
More file actions
executable file
·39 lines (30 loc) · 811 Bytes
/
C2.java
File metadata and controls
executable file
·39 lines (30 loc) · 811 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
32
33
34
35
36
37
38
39
package playground;
import act.app.ActionContext;
import org.osgl.mvc.annotation.Before;
import org.osgl.mvc.result.Result;
import javax.inject.Named;
public class C2 extends CBase {
@Before(priority = 5, except = "doAnn")
public void before() {
}
private boolean cond1() {
return true;
}
public void foo(String id, String email, ActionContext ctx) {
if (cond1()) {
ctx.param("id", id);
ctx.param("email", email);
render(id, email);
} else if (id.hashCode() < 10) {
ctx.param("id", id);
render(id);
} else {
throw render(email);
}
}
public Result bar() {
return ok();
}
public void foo(@Named("abc") String x, @Named("xyz") int i) {
}
}