Package android.databinding.tool.expr
Class FieldAccessExpr
- java.lang.Object
-
- android.databinding.tool.expr.Expr
-
- android.databinding.tool.expr.MethodBaseExpr
-
- android.databinding.tool.expr.FieldAccessExpr
-
- All Implemented Interfaces:
android.databinding.tool.expr.VersionProvider,android.databinding.tool.processing.scopes.LocationScopeProvider,android.databinding.tool.processing.scopes.ScopeProvider
public class FieldAccessExpr extends MethodBaseExpr
-
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringasPackage()ExprcloneToModel(ExprModel model)protected java.lang.StringcomputeUniqueKey()protected android.databinding.tool.writer.KCodegenerateCode()ExprgenerateInverse(ExprModel model, Expr value, java.lang.String bindingClassName)java.util.Set<FieldAccessExpr>getBindableDependents()java.lang.StringgetBrName()java.lang.String[]getDirtyingProperties()CallablegetGetter()java.lang.StringgetInvertibleError()intgetMinApi()booleanhasBindableAnnotations()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.protected voidreplaceStaticIdentifier(android.databinding.tool.reflection.ModelClass staticIdentifierType)protected voidresetResolvedType()ExprresolveListeners(android.databinding.tool.reflection.ModelClass listener, Expr parent)ExprresolveTwoWayExpressions(Expr parent)protected android.databinding.tool.reflection.ModelClassresolveType(android.databinding.tool.reflection.ModelAnalyzer modelAnalyzer)java.lang.StringtoString()-
Methods inherited from class android.databinding.tool.expr.MethodBaseExpr
constructDependencies, getName, getTarget, resolveListenersAsMethodReference, toExecutionPath, updateExpr
-
Methods inherited from class android.databinding.tool.expr.Expr
addJustMeToExecutionPath, addLocation, assertIsInvertible, canBeEvaluatedToAVariable, canBeInvalidated, cloneToModel, considerElevatingConditionals, constructDynamicChildrenDependencies, enableDirectInvalidation, 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, markAsUsed, markAsUsedInCallback, markFlagsAsRead, onSwappedWith, provideScopeLocation, recursivelyInjectSafeUnboxing, safeUnboxChild, setId, setModel, setRequirementId, setUnwrapObservableFields, shouldReadNow, toCode, toExecutionPath, toExecutionPathInOrder, toExecutionPathInOrder, toFullCode, trimShouldReadFlags, unwrapChildTo, unwrapObservableField, unwrapObservableFieldChildren
-
-
-
-
Method Detail
-
getGetter
public Callable getGetter()
-
resetResolvedType
protected void resetResolvedType()
- Overrides:
resetResolvedTypein classExpr
-
getInvertibleError
public java.lang.String getInvertibleError()
- Specified by:
getInvertibleErrorin classExpr- Returns:
- The reason the expression wasn't invertible or null if it was invertible.
-
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
-
getMinApi
public int getMinApi()
-
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
-
hasBindableAnnotations
public boolean hasBindableAnnotations()
-
resolveListeners
public Expr resolveListeners(android.databinding.tool.reflection.ModelClass listener, Expr parent)
- Overrides:
resolveListenersin classExpr
-
computeUniqueKey
protected java.lang.String computeUniqueKey()
- Specified by:
computeUniqueKeyin classExpr
-
getBrName
public java.lang.String getBrName()
-
getDirtyingProperties
public java.lang.String[] getDirtyingProperties()
- Returns:
- The list of all properties that dirty this expression. This will also contain the the BR identifier for this property if there is one. If the property is not bindable, it will contain an empty list.
-
getBindableDependents
public java.util.Set<FieldAccessExpr> getBindableDependents()
-
resolveType
protected android.databinding.tool.reflection.ModelClass resolveType(android.databinding.tool.reflection.ModelAnalyzer modelAnalyzer)
- Specified by:
resolveTypein classExpr
-
replaceStaticIdentifier
protected void replaceStaticIdentifier(android.databinding.tool.reflection.ModelClass staticIdentifierType)
-
resolveTwoWayExpressions
public Expr resolveTwoWayExpressions(Expr parent)
- Overrides:
resolveTwoWayExpressionsin classExpr
-
generateCode
protected android.databinding.tool.writer.KCode generateCode()
- Specified by:
generateCodein classExpr
-
generateInverse
public Expr generateInverse(ExprModel model, Expr value, java.lang.String bindingClassName)
- Overrides:
generateInversein classExpr
-
cloneToModel
public Expr cloneToModel(ExprModel model)
- Specified by:
cloneToModelin classExpr
-
-