예제 #1
0
파일: Debug.java 프로젝트: rjsingh/graal
 public static <T> T scope(String name, Object[] context, Callable<T> callable) {
   if (ENABLED) {
     return DebugScope.getInstance().scope(name, null, callable, false, null, context);
   } else {
     return DebugScope.call(callable);
   }
 }
예제 #2
0
파일: Debug.java 프로젝트: rjsingh/graal
 /**
  * Creates a new debug scope that is unrelated to the current scope and runs a given task in the
  * new scope.
  *
  * @param name new scope name
  * @param context the context objects of the new scope
  * @param config the debug configuration to use for the new scope
  * @param callable the task to run in the new scope
  */
 public static <T> T sandbox(
     String name, Object[] context, DebugConfig config, Callable<T> callable) {
   if (ENABLED) {
     return DebugScope.getInstance().scope(name, null, callable, true, config, context);
   } else {
     return DebugScope.call(callable);
   }
 }