src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java
changeset 53227 f15d443f9731
parent 51713 d424675a9743
child 55263 830ca7b43b95
equal deleted inserted replaced
53226:4ff3f9d83fe5 53227:f15d443f9731
   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.SWITCH_EXPRESSION ||
   169             feature == Feature.SWITCH_MULTIPLE_CASE_LABELS ||
   169             feature == Feature.SWITCH_MULTIPLE_CASE_LABELS ||
   170             feature == Feature.SWITCH_RULE ||
   170             feature == Feature.SWITCH_RULE)
   171             feature == Feature.RAW_STRING_LITERALS)
       
   172             return true;
   171             return true;
   173         //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).
   174         //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'
   175         //for those selected features, and 'false' for all the others.
   174         //for those selected features, and 'false' for all the others.
   176         return forcePreview;
   175         return forcePreview;