aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/ValLessSimple.java
blob: 28772d680a684d1bf26f82a4e1c376fb736d42a5 (plain)
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
40
import lombok.val;
public class ValLessSimple {
  private short field2 = 5;
  {
    System.out.println("Hello");
    final @val int z = 20;
    final @val int x = 10;
    final @val int a = z;
    final @val short y = field2;
  }
  private String field = "field";
  public ValLessSimple() {
    super();
  }
  private String method() {
    return "method";
  }
  private double method2() {
    return 2.0;
  }
  private void testVal(String param) {
    final @val java.lang.String fieldV = field;
    final @val int a = 10;
    final @val int b = 20;
    {
      final @val java.lang.String methodV = method();
      final @val java.lang.String foo = (fieldV + methodV);
    }
  }
  private void testValInCatchBlock() {
    try 
      {
        final @val int x = (1 / 0);
      }
    catch (ArithmeticException e)
      {
        final @val int y = 0;
      }
  }
}