aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test4/JIRA181.java
blob: 7c0b0930c66e3a60f1ed5eb50dcd55455aaae8d7 (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
package test4;

import java.util.ArrayList;

public class JIRA181<T extends Number> extends ArrayList<T> {
    /** default serialVersionUID */
    private static final long serialVersionUID = 1L;

    public @interface Condition {
    	Class<? extends ICondition> condition();
    }

    public @interface Condition2 {
    	Class<?> condition();
    }

    @Condition(condition = B.class)
    public Object aField;

    @Condition2(condition = B[].class)
    public Object aField2;

    public interface ICondition {
        boolean match(Object src);
    }

    private class B implements ICondition {
        public boolean match(Object src) {
            return JIRA181.this.size() > 0;
        }
    }
}