equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, 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 |
163 * Is given feature a preview feature? |
163 * Is given feature a preview feature? |
164 * @param feature the feature to be tested. |
164 * @param feature the feature to be tested. |
165 * @return true, if given feature is a preview feature. |
165 * @return true, if given feature is a preview feature. |
166 */ |
166 */ |
167 public boolean isPreview(Feature feature) { |
167 public boolean isPreview(Feature feature) { |
168 if (feature == Feature.TEXT_BLOCKS) |
168 if (feature == Feature.PATTERN_MATCHING_IN_INSTANCEOF || |
|
169 feature == Feature.REIFIABLE_TYPES_INSTANCEOF || |
|
170 feature == Feature.TEXT_BLOCKS) |
169 return true; |
171 return true; |
170 //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing). |
172 //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing). |
171 //When real preview features will be added, this method can be implemented to return 'true' |
173 //When real preview features will be added, this method can be implemented to return 'true' |
172 //for those selected features, and 'false' for all the others. |
174 //for those selected features, and 'false' for all the others. |
173 return forcePreview; |
175 return forcePreview; |