Class Scope
- java.lang.Object
-
- android.databinding.tool.processing.Scope
-
public class Scope extends java.lang.ObjectUtility class to keep track of "logical" stack traces, which we can use to print better error reports.
-
-
Constructor Summary
Constructors Constructor Description Scope()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertNoError()static voiddefer(ScopedException exception)static voidenter(ScopeProvider scopeProvider)static voidenter(Location location)static voidexit()static voidregisterError(java.lang.String msg, ScopeProvider... scopeProviders)Convenience method to add an error in a known list of scopes, w/o adding try catch flows.
-
-
-
Method Detail
-
enter
public static void enter(Location location)
-
enter
public static void enter(ScopeProvider scopeProvider)
-
exit
public static void exit()
-
defer
public static void defer(ScopedException exception)
-
registerError
public static void registerError(java.lang.String msg, ScopeProvider... scopeProviders)Convenience method to add an error in a known list of scopes, w/o adding try catch flows.This code actually starts entering the given scopes 1 by 1, starting from 0. When list is consumed, it creates the exception and defers if possible then exits from the provided scopes.
Note that these scopes are added on top of the already existing scopes.
- Parameters:
msg- The exception messagescopeProviders- The list of additional scope providers to enter. Null scopes are automatically ignored.
-
assertNoError
public static void assertNoError()
-
-