test/lib/sun/hotspot/WhiteBox.java

Print this page
rev 1694 : [mq] cds


 388   public native Long    getMethodUintxOption(Executable method, String name);
 389   public native Double  getMethodDoubleOption(Executable method, String name);
 390   public native String  getMethodStringOption(Executable method, String name);
 391   private final List<BiFunction<Executable,String,Object>> methodOptionGetters
 392       = Arrays.asList(this::getMethodBooleanOption, this::getMethodIntxOption,
 393           this::getMethodUintxOption, this::getMethodDoubleOption,
 394           this::getMethodStringOption);
 395 
 396   public Object getMethodOption(Executable method, String name) {
 397     return methodOptionGetters.stream()
 398                               .map(f -> f.apply(method, name))
 399                               .filter(x -> x != null)
 400                               .findAny()
 401                               .orElse(null);
 402   }
 403 
 404   // Safepoint Checking
 405   public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
 406 
 407   // Sharing

 408   public native boolean isShared(Object o);
 409   public native boolean areSharedStringsIgnored();
 410 }


 388   public native Long    getMethodUintxOption(Executable method, String name);
 389   public native Double  getMethodDoubleOption(Executable method, String name);
 390   public native String  getMethodStringOption(Executable method, String name);
 391   private final List<BiFunction<Executable,String,Object>> methodOptionGetters
 392       = Arrays.asList(this::getMethodBooleanOption, this::getMethodIntxOption,
 393           this::getMethodUintxOption, this::getMethodDoubleOption,
 394           this::getMethodStringOption);
 395 
 396   public Object getMethodOption(Executable method, String name) {
 397     return methodOptionGetters.stream()
 398                               .map(f -> f.apply(method, name))
 399                               .filter(x -> x != null)
 400                               .findAny()
 401                               .orElse(null);
 402   }
 403 
 404   // Safepoint Checking
 405   public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
 406 
 407   // Sharing
 408   public native boolean isSharedClass(Class<?> c);
 409   public native boolean isShared(Object o);
 410   public native boolean areSharedStringsIgnored();
 411 }