Home | History | Annotate | Download | only in api
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.ide.common.rendering.api;
     18 
     19 /**
     20  * Special wrapper class used in special case for {@link ILayoutPullParser#getViewCookie()}.
     21  * <p/>
     22  * When an {@code include} tag points to a layout with a {@code merge} top level item, there is no
     23  * top level item that can use the {@code include} item as cookie.
     24  * <p/>
     25  * This class is used as a cookie for all items under the {@code merge} (while referencing the
     26  * original {@code include} cookie) to make it easy on the client to group all merged items
     27  * into a single outline item.
     28  *
     29  */
     30 public final class MergeCookie {
     31 
     32     private final Object mCookie;
     33 
     34     public MergeCookie(Object cookie) {
     35         mCookie = cookie;
     36 
     37     }
     38 
     39     public Object getCookie() {
     40         return mCookie;
     41     }
     42 }
     43