Class CallbackExprModel


  • public class CallbackExprModel
    extends ExprModel
    Callbacks are evaluated when event happens, not when execute pending is run. To separate their expressions, we provide a separate model for them that extends the main model. This allows them to introduce their own variables etc. without mixing them with other expressions.
    • Constructor Detail

      • CallbackExprModel

        public CallbackExprModel​(ExprModel original)
    • Method Detail

      • getImports

        public android.databinding.tool.reflection.ImportBag getImports()
        Overrides:
        getImports in class ExprModel
      • addImport

        public StaticIdentifierExpr addImport​(java.lang.String alias,
                                              java.lang.String type,
                                              android.databinding.tool.store.Location location)
        Overrides:
        addImport in class ExprModel
      • register

        public <T extends Expr> T register​(T expr)
        Description copied from class: ExprModel
        Adds the expression to the list of expressions and returns it. If it already exists, returns existing one.
        Overrides:
        register in class ExprModel
        Parameters:
        expr - The new parsed expression
        Returns:
        The expression itself or another one if the same thing was parsed before
      • seal

        public void seal()
        Description copied from class: ExprModel
        Give id to each expression. Will be useful if we serialize.
        Overrides:
        seal in class ExprModel
      • callbackArg

        public CallbackArgExpr callbackArg​(java.lang.String name)
      • getArgCount

        public int getArgCount()