Package sc.bind

Class AbstractMethodBinding

    • Constructor Detail

      • AbstractMethodBinding

        public AbstractMethodBinding​(java.lang.Object dstObject,
                                     java.lang.Object dstBinding,
                                     java.lang.Object methodObject,
                                     IBinding[] parameterBindings,
                                     BindingDirection dir,
                                     int flags,
                                     BindOptions opts)
    • Method Detail

      • invokeMethod

        protected abstract java.lang.Object invokeMethod​(java.lang.Object obj,
                                                         boolean pendingChild)
      • invokeReverseMethod

        protected abstract java.lang.Object invokeReverseMethod​(java.lang.Object obj,
                                                                java.lang.Object value)
      • setMethObj

        protected void setMethObj​(java.lang.Object newMethObj)
      • setBindingParent

        public void setBindingParent​(IBinding parent,
                                     BindingDirection dir)
        Called by the parent when this is a hierarchical binding - i.e. one expression in another
      • initParams

        protected void initParams()
      • initializeBinding

        public java.lang.Object initializeBinding()
        Called only for top level bindings
      • getPropertyValue

        public java.lang.Object getPropertyValue​(java.lang.Object object,
                                                 boolean getField,
                                                 boolean pendingChild)
        Description copied from interface: IBinding
        Retrieves the current value of the binding given the current object. Use getField = true to force use of the field, rather than the getX method if one exists. Use pendingChild = true for a special case where we are getting the property value of a binding that is part of a reverse binding but where the cached value is up-to-update because we are updating a child remote property.
      • addBindingListener

        public void addBindingListener​(java.lang.Object eventObject,
                                       IListener listener,
                                       int event)
        Implemented only for child property bindings
      • removeBindingListener

        public void removeBindingListener​(java.lang.Object eventObject,
                                          IListener listener,
                                          int event)
        Abstract method objects don't in general do this. Their listeners are implicitly added via the bindings list in the parameters. That gets set up during init and torn down in "removeListener".
      • invalidateBinding

        public void invalidateBinding​(java.lang.Object object,
                                      boolean sendEvent,
                                      int event,
                                      boolean invalidateParams)
      • needsMethodObj

        protected boolean needsMethodObj()
        Override in subclasses that do not use the methObj so we can tell when the method just could not be resolved
      • removeListener

        public void removeListener()
      • applyBinding

        public boolean applyBinding​(java.lang.Object obj,
                                    java.lang.Object value,
                                    IBinding src,
                                    boolean refresh,
                                    boolean pendingChild)
      • applyPendingValue

        protected void applyPendingValue​(java.lang.Object pendingResult)
      • applyChangedValue

        protected void applyChangedValue​(java.lang.Object newBoundValue)
      • equalObjects

        protected boolean equalObjects​(java.lang.Object v1,
                                       java.lang.Object v2)
      • applyReverseBinding

        public void applyReverseBinding​(java.lang.Object obj,
                                        java.lang.Object value,
                                        java.lang.Object src)
      • isConstant

        public boolean isConstant()
      • activate

        public void activate​(boolean state,
                             java.lang.Object obj,
                             boolean chained)
        Description copied from interface: IBinding
        Called to deactive/re-activate a child binding for a condition or ternary expression
        Specified by:
        activate in interface IBinding
        activate in class AbstractListener
      • getBoundParams

        public IBinding[] getBoundParams()
      • useParens

        protected boolean useParens()
      • toBindingString

        public java.lang.StringBuilder toBindingString​(boolean displayValue)
      • isRefreshDisabled

        protected boolean isRefreshDisabled()
      • isReversible

        public boolean isReversible()
      • cleanParamValues

        protected java.lang.Object[] cleanParamValues()
      • hasPendingParams

        protected boolean hasPendingParams()
      • hasUnsetParams

        protected boolean hasUnsetParams()
      • hasNullParams

        protected boolean hasNullParams()