org.chromium.sdk/src/org/chromium/sdk/internal/protocol/data/PropertyObject.java
changeset 2 e4420d2515f1
equal deleted inserted replaced
1:ef76fc2ac88c 2:e4420d2515f1
       
     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.protocol.data;
       
     6 
       
     7 import org.chromium.sdk.internal.protocolparser.JsonSubtypeCasting;
       
     8 import org.chromium.sdk.internal.protocolparser.JsonType;
       
     9 
       
    10 /**
       
    11  * A type for a property object. May have 2 different forms (subtypes).
       
    12  * <p>Gets serialized in mirror-delay.js,
       
    13  * JSONProtocolSerializer.prototype.serializeProperty_
       
    14  */
       
    15 @JsonType
       
    16 public interface PropertyObject {
       
    17   /**
       
    18    * @return either String (normal property) or Long (array element)
       
    19    */
       
    20   Object name();
       
    21 
       
    22   @JsonSubtypeCasting
       
    23   PropertyWithValue asPropertyWithValue();
       
    24 
       
    25   @JsonSubtypeCasting
       
    26   PropertyWithRef asPropertyWithRef();
       
    27 }