src/share/classes/com/sun/tools/javac/code/Source.java

changeset 1570
f91144b7da75
parent 1521
71f35e4b93a5
child 1562
2154ed9ff6c8
equal deleted inserted replaced
1569:475eb15dfdad 1570:f91144b7da75
1 /* 1 /*
2 * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
174 return compareTo(JDK1_5) >= 0; 174 return compareTo(JDK1_5) >= 0;
175 } 175 }
176 public boolean allowTryWithResources() { 176 public boolean allowTryWithResources() {
177 return compareTo(JDK1_7) >= 0; 177 return compareTo(JDK1_7) >= 0;
178 } 178 }
179 public boolean allowBinaryLiterals() {
180 return compareTo(JDK1_7) >= 0;
181 }
182 public boolean allowUnderscoresInLiterals() {
183 return compareTo(JDK1_7) >= 0;
184 }
185 public boolean allowStringsInSwitch() {
186 return compareTo(JDK1_7) >= 0;
187 }
188 public boolean allowSimplifiedVarargs() {
189 return compareTo(JDK1_7) >= 0;
190 }
191 public boolean allowObjectToPrimitiveCast() {
192 return compareTo(JDK1_7) >= 0;
193 }
194 public boolean allowPoly() {
195 return compareTo(JDK1_8) >= 0;
196 }
197 public boolean allowLambda() {
198 return compareTo(JDK1_8) >= 0;
199 }
200 public boolean allowMethodReferences() {
201 return compareTo(JDK1_8) >= 0;
202 }
203 public boolean allowDefaultMethods() {
204 return compareTo(JDK1_8) >= 0;
205 }
206 public boolean allowStaticInterfaceMethods() {
207 return compareTo(JDK1_8) >= 0;
208 }
209 public boolean allowStrictMethodClashCheck() {
210 return compareTo(JDK1_8) >= 0;
211 }
212 public boolean allowEffectivelyFinalInInnerClasses() {
213 return compareTo(JDK1_8) >= 0;
214 }
179 public boolean allowTypeAnnotations() { 215 public boolean allowTypeAnnotations() {
180 return compareTo(JDK1_7) >= 0;
181 }
182 public boolean allowBinaryLiterals() {
183 return compareTo(JDK1_7) >= 0;
184 }
185 public boolean allowUnderscoresInLiterals() {
186 return compareTo(JDK1_7) >= 0;
187 }
188 public boolean allowStringsInSwitch() {
189 return compareTo(JDK1_7) >= 0;
190 }
191 public boolean allowSimplifiedVarargs() {
192 return compareTo(JDK1_7) >= 0;
193 }
194 public boolean allowObjectToPrimitiveCast() {
195 return compareTo(JDK1_7) >= 0;
196 }
197 public boolean allowPoly() {
198 return compareTo(JDK1_8) >= 0;
199 }
200 public boolean allowLambda() {
201 return compareTo(JDK1_8) >= 0;
202 }
203 public boolean allowMethodReferences() {
204 return compareTo(JDK1_8) >= 0;
205 }
206 public boolean allowDefaultMethods() {
207 return compareTo(JDK1_8) >= 0;
208 }
209 public boolean allowStrictMethodClashCheck() {
210 return compareTo(JDK1_8) >= 0;
211 }
212 public boolean allowEffectivelyFinalInInnerClasses() {
213 return compareTo(JDK1_8) >= 0; 216 return compareTo(JDK1_8) >= 0;
214 } 217 }
215 public boolean allowRepeatedAnnotations() { 218 public boolean allowRepeatedAnnotations() {
216 return compareTo(JDK1_8) >= 0; 219 return compareTo(JDK1_8) >= 0;
217 } 220 }
218 public boolean allowIntersectionTypesInCast() { 221 public boolean allowIntersectionTypesInCast() {
222 return compareTo(JDK1_8) >= 0;
223 }
224 public boolean allowEarlyReturnConstraints() {
225 return compareTo(JDK1_8) >= 0;
226 }
227 public boolean allowStructuralMostSpecific() {
219 return compareTo(JDK1_8) >= 0; 228 return compareTo(JDK1_8) >= 0;
220 } 229 }
221 public static SourceVersion toSourceVersion(Source source) { 230 public static SourceVersion toSourceVersion(Source source) {
222 switch(source) { 231 switch(source) {
223 case JDK1_2: 232 case JDK1_2:

mercurial