Package android.databinding.tool.expr
Class LambdaExpr
- java.lang.Object
-
- android.databinding.tool.expr.Expr
-
- android.databinding.tool.expr.LambdaExpr
-
- All Implemented Interfaces:
android.databinding.tool.expr.VersionProvider,android.databinding.tool.processing.scopes.LocationScopeProvider,android.databinding.tool.processing.scopes.ScopeProvider
public class LambdaExpr extends Expr
-
-
Field Summary
-
Fields inherited from class android.databinding.tool.expr.Expr
KEY_END, KEY_JOIN, KEY_JOIN_END, KEY_JOIN_START, KEY_START, mChildren, NO_ID
-
-
Constructor Summary
Constructors Constructor Description LambdaExpr(Expr expr, CallbackExprModel callbackExprModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExprcloneToModel(ExprModel model)protected java.lang.StringcomputeUniqueKey()protected java.util.List<Dependency>constructDependencies()protected android.databinding.tool.writer.KCodegenerateCode()java.lang.StringgenerateConstructor()CallbackExprModelgetCallbackExprModel()intgetCallbackId()CallbackWrappergetCallbackWrapper()ExecutionPathgetExecutionPath()ExprgetExpr()protected java.lang.StringgetInvertibleError()voidinjectSafeUnboxing(android.databinding.tool.reflection.ModelAnalyzer modelAnalyzer, ExprModel model)Called after experiment model is sealed to avoid NPE problems caused by boxed primitives.booleanisDynamic()Whether the result of this expression can change or not.voidmarkAsUsed()ExprresolveListeners(android.databinding.tool.reflection.ModelClass valueType, Expr parent)protected android.databinding.tool.reflection.ModelClassresolveType(android.databinding.tool.reflection.ModelAnalyzer modelAnalyzer)voidsetup(android.databinding.tool.reflection.ModelClass klass, ModelMethod method, int callbackId)java.util.List<ExecutionPath>toExecutionPath(java.util.List<ExecutionPath> paths)java.lang.StringtoString()-
Methods inherited from class android.databinding.tool.expr.Expr
addJustMeToExecutionPath, addLocation, asPackage, assertIsInvertible, canBeEvaluatedToAVariable, canBeInvalidated, cloneToModel, considerElevatingConditionals, constructDynamicChildrenDependencies, enableDirectInvalidation, generateInverse, getAllCalculationPaths, getChildren, getDefaultValue, getDependants, getDependencies, getId, getInvalidFlags, getLocations, getModel, getParents, getPredicateInvalidFlags, getReadSoFar, getRequirementFlagIndex, getRequirementId, getResolvedType, getShouldReadFlags, getShouldReadFlagsWithConditionals, getUniqueKey, getUpdateRegistrationCall, getVersion, hasConditionalDependant, hasId, hasNestedCannotRead, invalidateReadFlags, isBindingExpression, isConditional, isEqualityCheck, isIsUsedInCallback, isObservable, isRead, isUsed, join, join, markAsBindingExpression, markAsReadIfDone, markAsUsedInCallback, markFlagsAsRead, onSwappedWith, provideScopeLocation, recursivelyInjectSafeUnboxing, resetResolvedType, resolveTwoWayExpressions, safeUnboxChild, setId, setModel, setRequirementId, setUnwrapObservableFields, shouldReadNow, toCode, toExecutionPath, toExecutionPathInOrder, toExecutionPathInOrder, toFullCode, trimShouldReadFlags, unwrapChildTo, unwrapObservableField, unwrapObservableFieldChildren, updateExpr
-
-
-
-
Constructor Detail
-
LambdaExpr
public LambdaExpr(Expr expr, CallbackExprModel callbackExprModel)
-
-
Method Detail
-
getExpr
public Expr getExpr()
-
getCallbackExprModel
public CallbackExprModel getCallbackExprModel()
-
resolveType
protected android.databinding.tool.reflection.ModelClass resolveType(android.databinding.tool.reflection.ModelAnalyzer modelAnalyzer)
- Specified by:
resolveTypein classExpr
-
constructDependencies
protected java.util.List<Dependency> constructDependencies()
- Specified by:
constructDependenciesin classExpr
-
getCallbackWrapper
public CallbackWrapper getCallbackWrapper()
-
resolveListeners
public Expr resolveListeners(android.databinding.tool.reflection.ModelClass valueType, Expr parent)
- Overrides:
resolveListenersin classExpr
-
computeUniqueKey
protected java.lang.String computeUniqueKey()
- Specified by:
computeUniqueKeyin classExpr
-
isDynamic
public boolean isDynamic()
Description copied from class:ExprWhether the result of this expression can change or not. For example, 3 + 5 can not change vs 3 + x may change. Default implementations checks children and returns true if any of them returns true
-
injectSafeUnboxing
public void injectSafeUnboxing(android.databinding.tool.reflection.ModelAnalyzer modelAnalyzer, ExprModel model)Description copied from class:ExprCalled after experiment model is sealed to avoid NPE problems caused by boxed primitives.- Specified by:
injectSafeUnboxingin classExpr
-
generateCode
protected android.databinding.tool.writer.KCode generateCode()
- Specified by:
generateCodein classExpr
-
cloneToModel
public Expr cloneToModel(ExprModel model)
- Specified by:
cloneToModelin classExpr
-
generateConstructor
public java.lang.String generateConstructor()
-
markAsUsed
public void markAsUsed()
- Overrides:
markAsUsedin classExpr
-
getInvertibleError
protected java.lang.String getInvertibleError()
- Specified by:
getInvertibleErrorin classExpr- Returns:
- The reason the expression wasn't invertible or null if it was invertible.
-
toExecutionPath
public java.util.List<ExecutionPath> toExecutionPath(java.util.List<ExecutionPath> paths)
- Overrides:
toExecutionPathin classExpr
-
getExecutionPath
public final ExecutionPath getExecutionPath()
-
getCallbackId
public int getCallbackId()
-
setup
public void setup(android.databinding.tool.reflection.ModelClass klass, ModelMethod method, int callbackId)
-
-