76 return source.compareTo(SourceLevel.JDK_7) < 0 ||
77 suppressLevelDecl == SuppressLevel.UNCHECKED ||
78 trustMe == TrustMe.TRUST;
79 case UNCHECKED:
80 return suppressLevelClient == SuppressLevel.UNCHECKED ||
81 (trustMe == TrustMe.TRUST &&
82 (((modKind == ModifierKind.FINAL || modKind == ModifierKind.STATIC) &&
83 source.compareTo( SourceLevel.JDK_7) >= 0 ) ||
84 (modKind == ModifierKind.PRIVATE && source.compareTo( SourceLevel.JDK_9) >= 0 )));
85 }
86
87 SuppressLevel supLev = this == VARARGS ?
88 suppressLevelDecl :
89 suppressLevelClient;
90 return supLev == SuppressLevel.UNCHECKED ||
91 (trustMe == TrustMe.TRUST && modKind != ModifierKind.NONE);
92 }
93 }
94
95 enum SourceLevel {
96 JDK_6("6"),
97 JDK_7("7"),
98 JDK_9("9");
99
100 String sourceKey;
101
102 SourceLevel(String sourceKey) {
103 this.sourceKey = sourceKey;
104 }
105 }
106
107 enum TrustMe implements ComboParameter {
108 DONT_TRUST(""),
109 TRUST("@java.lang.SafeVarargs");
110
111 String anno;
112
113 TrustMe(String anno) {
114 this.anno = anno;
115 }
116
|
76 return source.compareTo(SourceLevel.JDK_7) < 0 ||
77 suppressLevelDecl == SuppressLevel.UNCHECKED ||
78 trustMe == TrustMe.TRUST;
79 case UNCHECKED:
80 return suppressLevelClient == SuppressLevel.UNCHECKED ||
81 (trustMe == TrustMe.TRUST &&
82 (((modKind == ModifierKind.FINAL || modKind == ModifierKind.STATIC) &&
83 source.compareTo( SourceLevel.JDK_7) >= 0 ) ||
84 (modKind == ModifierKind.PRIVATE && source.compareTo( SourceLevel.JDK_9) >= 0 )));
85 }
86
87 SuppressLevel supLev = this == VARARGS ?
88 suppressLevelDecl :
89 suppressLevelClient;
90 return supLev == SuppressLevel.UNCHECKED ||
91 (trustMe == TrustMe.TRUST && modKind != ModifierKind.NONE);
92 }
93 }
94
95 enum SourceLevel {
96 JDK_7("7"),
97 JDK_9("9");
98
99 String sourceKey;
100
101 SourceLevel(String sourceKey) {
102 this.sourceKey = sourceKey;
103 }
104 }
105
106 enum TrustMe implements ComboParameter {
107 DONT_TRUST(""),
108 TRUST("@java.lang.SafeVarargs");
109
110 String anno;
111
112 TrustMe(String anno) {
113 this.anno = anno;
114 }
115
|