< prev index next >

test/langtools/tools/javac/recovery/ClassBlockExits.java

Print this page

121 
122     public enum Exit implements ComboParameter {
123         RETURN("return;"),
124         RETURN_VALUE("return null;"),
125         BREAK("break;"),
126         BREAK_LABEL("break LABEL;"),
127         CONTINUE("continue;"),
128         CONTINUE_LABEL("continue LABEL;"),
129         YIELD("yield 0;");
130         private final String code;
131 
132         private Exit(String code) {
133             this.code = code;
134         }
135 
136         @Override
137         public String expand(String optParameter) {
138             return code;
139         }
140     }
141 }

121 
122     public enum Exit implements ComboParameter {
123         RETURN("return;"),
124         RETURN_VALUE("return null;"),
125         BREAK("break;"),
126         BREAK_LABEL("break LABEL;"),
127         CONTINUE("continue;"),
128         CONTINUE_LABEL("continue LABEL;"),
129         YIELD("yield 0;");
130         private final String code;
131 
132         private Exit(String code) {
133             this.code = code;
134         }
135 
136         @Override
137         public String expand(String optParameter) {
138             return code;
139         }
140     }
141 }
< prev index next >