Package android.databinding.tool
Class BindingTarget
- java.lang.Object
-
- android.databinding.tool.BindingTarget
-
- All Implemented Interfaces:
android.databinding.tool.processing.scopes.LocationScopeProvider,android.databinding.tool.processing.scopes.ScopeProvider
public class BindingTarget extends java.lang.Object implements android.databinding.tool.processing.scopes.LocationScopeProvider
-
-
Constructor Summary
Constructors Constructor Description BindingTarget(android.databinding.tool.store.ResourceBundle.BindingTargetBundle bundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBinding(java.lang.String name, Expr expr)InverseBindingaddInverseBinding(java.lang.String name, Expr expr, java.lang.String bindingClass)InverseBindingaddInverseBinding(java.lang.String name, SetterStore.BindingGetterCall call)java.util.List<Binding>getBindings()java.lang.StringgetId()java.lang.StringgetIncludedLayout()java.lang.StringgetIncludedLayoutPackage()java.lang.StringgetInterfaceType()java.util.List<InverseBinding>getInverseBindings()ExprModelgetModel()java.lang.StringgetOriginalTag()android.databinding.tool.reflection.ModelClassgetResolvedType()java.lang.StringgetTag()java.lang.StringgetViewClass()voidinjectSafeUnboxing(ExprModel exprModel)Called after experiment model is sealed to avoid NPE problems caused by boxed primitives.booleanisBinder()This will return true for both DataBinding and ViewBinding targets.booleanisUsed()java.util.List<android.databinding.tool.store.Location>provideScopeLocation()voidresolveCallbackParams()voidresolveListeners()voidresolveMultiSetters()Called after BindingTarget is finalized.voidresolveTwoWayExpressions()voidsetModel(ExprModel model)booleansupportsTag()
-
-
-
Method Detail
-
isUsed
public boolean isUsed()
-
addBinding
public void addBinding(java.lang.String name, Expr expr)
-
getInterfaceType
public java.lang.String getInterfaceType()
-
addInverseBinding
public InverseBinding addInverseBinding(java.lang.String name, Expr expr, java.lang.String bindingClass)
-
addInverseBinding
public InverseBinding addInverseBinding(java.lang.String name, SetterStore.BindingGetterCall call)
-
provideScopeLocation
public java.util.List<android.databinding.tool.store.Location> provideScopeLocation()
- Specified by:
provideScopeLocationin interfaceandroid.databinding.tool.processing.scopes.LocationScopeProvider
-
getId
public java.lang.String getId()
-
getTag
public java.lang.String getTag()
-
getOriginalTag
public java.lang.String getOriginalTag()
-
getViewClass
public java.lang.String getViewClass()
-
getResolvedType
public android.databinding.tool.reflection.ModelClass getResolvedType()
-
getIncludedLayout
public java.lang.String getIncludedLayout()
-
getIncludedLayoutPackage
@Nullable public java.lang.String getIncludedLayoutPackage()
-
isBinder
public boolean isBinder()
This will return true for both DataBinding and ViewBinding targets. Check the resolved type if you need to distinguish between the two.
-
supportsTag
public boolean supportsTag()
-
getBindings
public java.util.List<Binding> getBindings()
-
getInverseBindings
public java.util.List<InverseBinding> getInverseBindings()
-
getModel
public ExprModel getModel()
-
setModel
public void setModel(ExprModel model)
-
injectSafeUnboxing
public void injectSafeUnboxing(ExprModel exprModel)
Called after experiment model is sealed to avoid NPE problems caused by boxed primitives.
-
resolveListeners
public void resolveListeners()
-
resolveCallbackParams
public void resolveCallbackParams()
-
resolveTwoWayExpressions
public void resolveTwoWayExpressions()
-
resolveMultiSetters
public void resolveMultiSetters()
Called after BindingTarget is finalized.We traverse all bindings and ask SetterStore to figure out if any can be combined. When N bindings are combined, they are demoted from being a binding expression and a new ArgList expression is added as the new binding expression that depends on others.
-
-