android.databinding.tool.processing
Class Scope

java.lang.Object
  extended by 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()
           
 
Method Summary
static void assertNoError()
           
static void defer(ScopedException exception)
           
static void enter(Location location)
           
static void enter(ScopeProvider scopeProvider)
           
static void exit()
           
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scope

public Scope()
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 message
scopeProviders - The list of additional scope providers to enter. Null scopes are automatically ignored.

assertNoError

public static void assertNoError()