src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java
changeset 59021 cfc7bb9a5a92
parent 58713 ad69fd32778e
child 59285 7799a51dbe30
equal deleted inserted replaced
59020:aebd72de84b0 59021:cfc7bb9a5a92
   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.SWITCH_EXPRESSION ||
   168         if (feature == Feature.TEXT_BLOCKS)
   169             feature == Feature.SWITCH_MULTIPLE_CASE_LABELS ||
       
   170             feature == Feature.SWITCH_RULE ||
       
   171             feature == Feature.TEXT_BLOCKS)
       
   172             return true;
   169             return true;
   173         //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing).
   170         //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing).
   174         //When real preview features will be added, this method can be implemented to return 'true'
   171         //When real preview features will be added, this method can be implemented to return 'true'
   175         //for those selected features, and 'false' for all the others.
   172         //for those selected features, and 'false' for all the others.
   176         return forcePreview;
   173         return forcePreview;