Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ClassDeclaration.java

Issue 244183002: Add ClassDeclaration/ClassTypeAlias.isAbstract() and use them. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: forgotten class Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ClassTypeAlias.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012, the Dart project authors. 2 * Copyright 2012, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 /** 297 /**
298 * Return the with clause for the class, or {@code null} if the class does not have a with clause. 298 * Return the with clause for the class, or {@code null} if the class does not have a with clause.
299 * 299 *
300 * @return the with clause for the class 300 * @return the with clause for the class
301 */ 301 */
302 public WithClause getWithClause() { 302 public WithClause getWithClause() {
303 return withClause; 303 return withClause;
304 } 304 }
305 305
306 /** 306 /**
307 * Return {@code true} if this class is declared to be an abstract class.
308 *
309 * @return {@code true} if this class is declared to be an abstract class
310 */
311 public boolean isAbstract() {
312 return abstractKeyword != null;
313 }
314
315 /**
307 * Set the 'abstract' keyword to the given keyword. 316 * Set the 'abstract' keyword to the given keyword.
308 * 317 *
309 * @param abstractKeyword the 'abstract' keyword 318 * @param abstractKeyword the 'abstract' keyword
310 */ 319 */
311 public void setAbstractKeyword(Token abstractKeyword) { 320 public void setAbstractKeyword(Token abstractKeyword) {
312 this.abstractKeyword = abstractKeyword; 321 this.abstractKeyword = abstractKeyword;
313 } 322 }
314 323
315 /** 324 /**
316 * Set the token representing the 'class' keyword to the given token. 325 * Set the token representing the 'class' keyword to the given token.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 415 }
407 416
408 @Override 417 @Override
409 protected Token getFirstTokenAfterCommentAndMetadata() { 418 protected Token getFirstTokenAfterCommentAndMetadata() {
410 if (abstractKeyword != null) { 419 if (abstractKeyword != null) {
411 return abstractKeyword; 420 return abstractKeyword;
412 } 421 }
413 return classKeyword; 422 return classKeyword;
414 } 423 }
415 } 424 }
OLDNEW
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ClassTypeAlias.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698