1206 public void setData(Object data) { 1207 Assert.check(!(data instanceof Env<?>), this); 1208 this.data = data; 1209 } 1210 1211 public <R, P> R accept(Symbol.Visitor<R, P> v, P p) { 1212 return v.visitVarSymbol(this, p); 1213 } 1214 } 1215 1216 /** A class for method symbols. 1217 */ 1218 public static class MethodSymbol extends Symbol implements ExecutableElement { 1219 1220 /** The code of the method. */ 1221 public Code code = null; 1222 1223 /** The extra (synthetic/mandated) parameters of the method. */ 1224 public List<VarSymbol> extraParams = List.nil(); 1225 1226 /** The parameters of the method. */ 1227 public List<VarSymbol> params = null; 1228 1229 /** The names of the parameters */ 1230 public List<Name> savedParameterNames; 1231 1232 /** For an attribute field accessor, its default value if any. 1233 * The value is null if none appeared in the method 1234 * declaration. 1235 */ 1236 public Attribute defaultValue = null; 1237 1238 /** Construct a method symbol, given its flags, name, type and owner. 1239 */ 1240 public MethodSymbol(long flags, Name name, Type type, Symbol owner) { 1241 super(MTH, flags, name, type, owner); 1242 if (owner.type.hasTag(TYPEVAR)) Assert.error(owner + "." + name); 1243 } 1244 1245 /** Clone this symbol with new owner. | 1206 public void setData(Object data) { 1207 Assert.check(!(data instanceof Env<?>), this); 1208 this.data = data; 1209 } 1210 1211 public <R, P> R accept(Symbol.Visitor<R, P> v, P p) { 1212 return v.visitVarSymbol(this, p); 1213 } 1214 } 1215 1216 /** A class for method symbols. 1217 */ 1218 public static class MethodSymbol extends Symbol implements ExecutableElement { 1219 1220 /** The code of the method. */ 1221 public Code code = null; 1222 1223 /** The extra (synthetic/mandated) parameters of the method. */ 1224 public List<VarSymbol> extraParams = List.nil(); 1225 1226 /** The captured local variables in an anonymous class */ 1227 public List<VarSymbol> capturedLocals = List.nil(); 1228 1229 /** The parameters of the method. */ 1230 public List<VarSymbol> params = null; 1231 1232 /** The names of the parameters */ 1233 public List<Name> savedParameterNames; 1234 1235 /** For an attribute field accessor, its default value if any. 1236 * The value is null if none appeared in the method 1237 * declaration. 1238 */ 1239 public Attribute defaultValue = null; 1240 1241 /** Construct a method symbol, given its flags, name, type and owner. 1242 */ 1243 public MethodSymbol(long flags, Name name, Type type, Symbol owner) { 1244 super(MTH, flags, name, type, owner); 1245 if (owner.type.hasTag(TYPEVAR)) Assert.error(owner + "." + name); 1246 } 1247 1248 /** Clone this symbol with new owner. |