/** The get accessor for {@link Target_java_io_DeleteOnExitHook#files}. */ static LinkedHashSet<String> getFiles() { initializeOnce(); return injectedFiles; }
@IgnoreForGetCallerClass class Holder { /** Instance of the annotation, useful when the annotation is manually injected. */ public static final IgnoreForGetCallerClass INSTANCE = DirectAnnotationAccess.getAnnotation(Holder.class, IgnoreForGetCallerClass.class); /** * Array that contains only the instance of the annotation, useful when the annotation is * manually injected. */ public static final Annotation[] ARRAY = new Annotation[]{INSTANCE}; } }
/** * Adds a tear down hook that is executed before the isolate torn down. * * @param tearDownHook hook to executed on isolate tear down. */ public void addTearDownHook(Runnable tearDownHook) { addHook(tearDownHooks, tearDownHook); }
@Override public void afterRegistration(AfterRegistrationAccess access) { SubstrateRuntimeMXBean runtimeMXBean = new SubstrateRuntimeMXBean(); ImageSingletons.add(RuntimeMXBean.class, runtimeMXBean); ImageSingletons.add(ThreadMXBean.class, new SubstrateThreadMXBean()); ImageSingletons.add(ClassLoadingMXBean.class, new SubstrateClassLoadingMXBean()); ImageSingletons.add(CompilationMXBean.class, new SubstrateCompilationMXBean()); RuntimeSupport.getRuntimeSupport().addStartupHook(runtimeMXBean.startupHook()); }
/** * Called only internally as part of the JDK shutdown process, use {@link #shutdown()} to * trigger the whoke JDK shutdown process. */ static void executeShutdownHooks() { executeHooks(getRuntimeSupport().shutdownHooks); }
@Override public void beforeAnalysis(BeforeAnalysisAccess access) { RuntimeSupport.getRuntimeSupport().sortCommandPlugins(); } }
@Override public void beforeAnalysis(BeforeAnalysisAccess access) { RuntimeSupport.getRuntimeSupport().addStartupHook(SubstrateSegfaultHandler::install); } }
/** The get access method for ForkJoinPool.common. */ public static ForkJoinPool getCommon() { ensureCommonPoolIsInitialized(); return Util_java_util_concurrent_ForkJoinPool.as_ForkJoinPool(injectedCommon.get()); }
private void buildInfo(boolean isStatic, String typeFieldName, Class<?> readOnlyClass, Class<?> readWriteClass) throws ReflectiveOperationException { VarHandleInfo info = new VarHandleInfo(isStatic, getDeclaredField(readOnlyClass, "fieldOffset"), getDeclaredField(readOnlyClass, typeFieldName)); infos.put(readOnlyClass, info); infos.put(readWriteClass, info); }
/** The get-accessor for SplittableRandom.defaultGen. */ static AtomicLong getDefaultGen() { AtomicLong result = defaultGen; if (result == null) { result = initialize(); } return result; }
/** Note that threading is being torn down. */ protected static void setTearingDown() { initializationState.set(STATE_TEARING_DOWN); }
/** Constructor for subclasses. */ private FeebleReferenceList() { head = new UninterruptibleUtils.AtomicReference<>(null); }
/** Clears the list, returning the previous value, which might be null. */ public FeebleReferenceList<T> clearList() { return list.getAndSet(null); }
@Override public void executeStartupHooks() { executeHooks(startupHooks); }
@Override public void afterRegistration(AfterRegistrationAccess access) { NativeLibrarySupport.initialize(); } }
static void initSunEC() { if (initialized) { return; } /* Lazy initialization. */ initOnce(); }
@Override public void run() { Target_java_io_DeleteOnExitHook.runHooks(); } });
static SecureRandom get() { SecureRandom result = RANDOM; if (result == null) { /* Lazy initialization on first access. */ result = initializeOnce(); } return result; }
/** * Called only internally as part of the isolate tear down process. These hooks clean up all * running threads to allow proper isolate tear down. * * Although public, this method should not go to the public API. */ public static void executeTearDownHooks() { executeHooks(getRuntimeSupport().tearDownHooks); }
/** The set accessor for {@link Target_java_io_DeleteOnExitHook#files}. */ static void setFiles(LinkedHashSet<String> value) { initializeOnce(); injectedFiles = value; }