2
|
1 |
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
2 |
// Use of this source code is governed by a BSD-style license that can be
|
|
3 |
// found in the LICENSE file.
|
|
4 |
|
|
5 |
package org.chromium.sdk.internal;
|
|
6 |
|
|
7 |
/**
|
|
8 |
* A representation of a properties data of a value in the remote JavaScript VM.
|
|
9 |
* Must be immutable. Conceptually it always corresponds to a {@link ValueMirror}
|
|
10 |
* and in a way should behave like dynamic subclass of ValueMirror.
|
|
11 |
*/
|
|
12 |
public class PropertyHoldingValueMirror {
|
|
13 |
private final ValueMirror valueMirror;
|
|
14 |
private final SubpropertiesMirror subpropertiesMirror;
|
|
15 |
|
|
16 |
PropertyHoldingValueMirror(ValueMirror valueMirror) {
|
|
17 |
this.valueMirror = valueMirror;
|
|
18 |
this.subpropertiesMirror = SubpropertiesMirror.EMPTY;
|
|
19 |
}
|
|
20 |
|
|
21 |
PropertyHoldingValueMirror(ValueMirror valueMirror, SubpropertiesMirror subpropertiesMirror) {
|
|
22 |
this.valueMirror = valueMirror;
|
|
23 |
this.subpropertiesMirror = subpropertiesMirror;
|
|
24 |
}
|
|
25 |
|
|
26 |
public ValueMirror getValueMirror() {
|
|
27 |
return valueMirror;
|
|
28 |
}
|
|
29 |
|
|
30 |
public SubpropertiesMirror getSubpropertiesMirror() {
|
|
31 |
return subpropertiesMirror;
|
|
32 |
}
|
|
33 |
}
|