Package android.databinding.tool.expr
Class CallbackExprModel
- java.lang.Object
-
- android.databinding.tool.expr.ExprModel
-
- android.databinding.tool.expr.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.
-
-
Field Summary
-
Fields inherited from class android.databinding.tool.expr.ExprModel
enableV2, modulePackage, SAFE_UNBOX_METHOD_NAME
-
-
Constructor Summary
Constructors Constructor Description CallbackExprModel(ExprModel original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticIdentifierExpraddImport(java.lang.String alias, java.lang.String type, android.databinding.tool.store.Location location)CallbackArgExprcallbackArg(java.lang.String name)intgetArgCount()java.util.List<CallbackArgExpr>getArguments()android.databinding.tool.reflection.ImportBaggetImports()IdentifierExpridentifier(java.lang.String name)<T extends Expr>
Tregister(T expr)Adds the expression to the list of expressions and returns it.voidseal()Give id to each expression.-
Methods inherited from class android.databinding.tool.expr.ExprModel
argListExpr, assignment, bindingExpr, bitshift, bracketExpr, builtInVariable, callbackWrapper, castExpr, comparison, field, filterShouldRead, findFlagExpression, findIdentifier, getBindingExpressions, getCallbackWrappers, getCurrentLocationInFile, getCurrentParserContext, getExprMap, getExt, getFlag, getFlagBucketCount, getFlagMapping, getInvalidateableFieldLimit, getInvalidateAnyBitSet, getInvalidateAnyFlagIndex, getObservables, getPendingExpressions, getTotalFlagCount, globalMethodCall, instanceOfOp, lambdaExpr, listenerExpr, logical, markBitsRead, markSealed, math, methodCall, methodReference, obtainCallbackId, removeExpr, resourceExpr, safeUnbox, setCurrentLocationInFile, setCurrentParserContext, size, staticIdentifier, staticIdentifierFor, symbol, ternary, twoWayListenerExpr, unary, viewDataBinding, viewFieldExpr
-
-
-
-
Constructor Detail
-
CallbackExprModel
public CallbackExprModel(ExprModel original)
-
-
Method Detail
-
getImports
public android.databinding.tool.reflection.ImportBag getImports()
- Overrides:
getImportsin classExprModel
-
addImport
public StaticIdentifierExpr addImport(java.lang.String alias, java.lang.String type, android.databinding.tool.store.Location location)
-
register
public <T extends Expr> T register(T expr)
Description copied from class:ExprModelAdds the expression to the list of expressions and returns it. If it already exists, returns existing one.
-
seal
public void seal()
Description copied from class:ExprModelGive id to each expression. Will be useful if we serialize.
-
identifier
public IdentifierExpr identifier(java.lang.String name)
- Overrides:
identifierin classExprModel
-
callbackArg
public CallbackArgExpr callbackArg(java.lang.String name)
-
getArgCount
public int getArgCount()
-
getArguments
public java.util.List<CallbackArgExpr> getArguments()
-
-