131 vm.printTrace("Clearing temporary cache for " + description());
132 }
133 disableCache();
134 if (addedListener) {
135 /*
136 * If a listener was added (i.e. this is not a
137 * ObjectReference that adds a listener on startup),
138 * remove it here.
139 */
140 addedListener = false;
141 return false; // false says remove
142 } else {
143 return true;
144 }
145 }
146 }
147
148 public boolean equals(Object obj) {
149 if (obj instanceof ObjectReferenceImpl other) {
150 return (ref() == other.ref()) &&
151 super.equals(obj);
152 } else {
153 return false;
154 }
155 }
156
157 @Override
158 public int hashCode() {
159 return Long.hashCode(ref());
160 }
161
162 public Type type() {
163 return referenceType();
164 }
165
166 public ReferenceType referenceType() {
167 if (type == null) {
168 try {
169 JDWP.ObjectReference.ReferenceType rtinfo =
170 JDWP.ObjectReference.ReferenceType.process(vm, this);
171 type = vm.referenceType(rtinfo.typeID,
|
131 vm.printTrace("Clearing temporary cache for " + description());
132 }
133 disableCache();
134 if (addedListener) {
135 /*
136 * If a listener was added (i.e. this is not a
137 * ObjectReference that adds a listener on startup),
138 * remove it here.
139 */
140 addedListener = false;
141 return false; // false says remove
142 } else {
143 return true;
144 }
145 }
146 }
147
148 public boolean equals(Object obj) {
149 if (obj instanceof ObjectReferenceImpl other) {
150 return (ref() == other.ref()) &&
151 super.equals(obj);
152 } else {
153 return false;
154 }
155 }
156
157 @Override
158 public int hashCode() {
159 return Long.hashCode(ref());
160 }
161
162 public Type type() {
163 return referenceType();
164 }
165
166 public ReferenceType referenceType() {
167 if (type == null) {
168 try {
169 JDWP.ObjectReference.ReferenceType rtinfo =
170 JDWP.ObjectReference.ReferenceType.process(vm, this);
171 type = vm.referenceType(rtinfo.typeID,
|