org.chromium.sdk/src/org/chromium/sdk/internal/PropertyReference.java
changeset 2 e4420d2515f1
child 276 f2f4a1259de8
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;
       
     6 
       
     7 
       
     8 /**
       
     9  * A named property reference.
       
    10  */
       
    11 public class PropertyReference {
       
    12   private final String name;
       
    13 
       
    14   private final DataWithRef smthWithRef;
       
    15 
       
    16   /**
       
    17    * @param propertyName the name of the property
       
    18    * @param valueObject a JSON descriptor of the property
       
    19    */
       
    20   public PropertyReference(String propertyName, DataWithRef smthWithRef) {
       
    21     this.name = propertyName;
       
    22     this.smthWithRef = smthWithRef;
       
    23   }
       
    24 
       
    25   public long getRef() {
       
    26     return smthWithRef.ref();
       
    27   }
       
    28 
       
    29   public String getName() {
       
    30     return name;
       
    31   }
       
    32 
       
    33   public DataWithRef getValueObject() {
       
    34     return smthWithRef;
       
    35   }
       
    36 }