android.databinding.tool.processing
Class Scope
java.lang.Object
android.databinding.tool.processing.Scope
public class Scope
- extends java.lang.Object
Utility class to keep track of "logical" stack traces, which we can use to print better error
reports.
Constructor Summary |
Scope()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Scope
public Scope()
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()