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

Side by Side Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/PropertyAccessorElementImpl.java

Issue 26746002: Issue 13918. final fields induce setters that are illegal to call (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. 2 * Copyright (c) 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 public PropertyInducingElement getVariable() { 104 public PropertyInducingElement getVariable() {
105 return variable; 105 return variable;
106 } 106 }
107 107
108 @Override 108 @Override
109 public boolean isAbstract() { 109 public boolean isAbstract() {
110 return hasModifier(Modifier.ABSTRACT); 110 return hasModifier(Modifier.ABSTRACT);
111 } 111 }
112 112
113 @Override 113 @Override
114 public boolean isExcludedSetter() {
115 return isSetter() && variable.isFinal();
116 }
117
118 @Override
114 public boolean isGetter() { 119 public boolean isGetter() {
115 return hasModifier(Modifier.GETTER); 120 return hasModifier(Modifier.GETTER);
116 } 121 }
117 122
118 @Override 123 @Override
119 public boolean isSetter() { 124 public boolean isSetter() {
120 return hasModifier(Modifier.SETTER); 125 return hasModifier(Modifier.SETTER);
121 } 126 }
122 127
123 @Override 128 @Override
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 this.variable = variable; 175 this.variable = variable;
171 } 176 }
172 177
173 @Override 178 @Override
174 protected void appendTo(StringBuilder builder) { 179 protected void appendTo(StringBuilder builder) {
175 builder.append(isGetter() ? "get " : "set "); 180 builder.append(isGetter() ? "get " : "set ");
176 builder.append(getVariable().getDisplayName()); 181 builder.append(getVariable().getDisplayName());
177 super.appendTo(builder); 182 super.appendTo(builder);
178 } 183 }
179 } 184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698