153 return prototype.isScope();
154 }
155
156 /**
157 * Get the property value from self as object.
158 *
159 * @return the property value
160 */
161 public Object getObjectValue() {
162 return property.getObjectValue(getGetterReceiver(), getOwner());
163 }
164
165 /**
166 * Set the property value in self.
167 *
168 * @param value the new value
169 * @param strict strict flag
170 */
171 public void setObjectValue(final Object value, final boolean strict) {
172 property.setObjectValue(getSetterReceiver(), getOwner(), value, strict);
173 }
174
175 }
176
|
153 return prototype.isScope();
154 }
155
156 /**
157 * Get the property value from self as object.
158 *
159 * @return the property value
160 */
161 public Object getObjectValue() {
162 return property.getObjectValue(getGetterReceiver(), getOwner());
163 }
164
165 /**
166 * Set the property value in self.
167 *
168 * @param value the new value
169 * @param strict strict flag
170 */
171 public void setObjectValue(final Object value, final boolean strict) {
172 property.setObjectValue(getSetterReceiver(), getOwner(), value, strict);
173 }
174
175 /**
176 * Get the number of objects in the prototype chain between the {@code self} and the
177 * {@code owner} objects.
178 * @return the prototype chain length
179 */
180 int getProtoChainLength() {
181 assert self != null;
182 int length = 0;
183 for (ScriptObject obj = self; obj != prototype; obj = obj.getProto()) {
184 assert !(obj instanceof WithObject);
185 ++length;
186 }
187 return length;
188 }
189
190 }
191
|