Class 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 Detail

      • BindingTarget

        public BindingTarget​(android.databinding.tool.store.ResourceBundle.BindingTargetBundle bundle)
    • 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)
      • provideScopeLocation

        public java.util.List<android.databinding.tool.store.Location> provideScopeLocation()
        Specified by:
        provideScopeLocation in interface android.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()
      • 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.