DataBindingComponent.java revision 9784c9aaedeb863018f5fcaa0a598e8e2f8ed2f3
1/*
2 * Copyright (C) 2015 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 */
16package android.databinding;
17
18import android.view.LayoutInflater;
19import android.view.View;
20import android.view.ViewGroup;
21
22/**
23 * This interface is generated during compilation to contain getters for all used instance
24 * BindingAdapters. When a BindingAdapter is an instance method, an instance of the class
25 * implementing the method must be instantiated. This interface will be generated with a getter
26 * for each class with the name get* where * is simple class name of the declaring BindingAdapter
27 * class/interface. Name collisions will be resolved by adding a numeric suffix to the getter.
28 * <p>
29 * An instance of this class may also be passed into static or instance BindingAdapters as the
30 * first parameter.
31 * <p>
32 * If using Dagger 2, the developer should extend this interface and annotate the extended interface
33 * as a Component.
34 *
35 * @see DataBindingUtil#setDefaultComponent(DataBindingComponent)
36 * @see DataBindingUtil#inflate(LayoutInflater, int, ViewGroup, boolean, DataBindingComponent)
37 * @see DataBindingUtil#bind(View, DataBindingComponent)
38 */
39public interface DataBindingComponent {
40}
41