1 /* |
1 /* |
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
122 return env1; |
122 return env1; |
123 } |
123 } |
124 |
124 |
125 @Override |
125 @Override |
126 public String toString() { |
126 public String toString() { |
127 return "Env[" + info + (outer == null ? "" : ",outer=" + outer) + "]"; |
127 StringBuilder sb = new StringBuilder(); |
|
128 sb.append("Env[").append(info); |
|
129 // if (enclMethod != null) |
|
130 // sb.append(",enclMethod=").append(Pretty.toSimpleString(enclMethod)); |
|
131 // if (enclClass != null) |
|
132 // sb.append(",enclClass=").append(Pretty.toSimpleString(enclClass)); |
|
133 if (outer != null) |
|
134 sb.append(",outer=").append(outer); |
|
135 sb.append("]"); |
|
136 return sb.toString(); |
128 } |
137 } |
129 |
138 |
130 public Iterator<Env<A>> iterator() { |
139 public Iterator<Env<A>> iterator() { |
131 return new Iterator<Env<A>>() { |
140 return new Iterator<Env<A>>() { |
132 Env<A> next = Env.this; |
141 Env<A> next = Env.this; |