< prev index next >

jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java

Print this page




  86     /**
  87      * Registers a shutdown hook.
  88      *
  89      * It is expected that this method with registerShutdownInProgress=true
  90      * is only used to register DeleteOnExitHook since the first file
  91      * may be added to the delete on exit list by the application shutdown
  92      * hooks.
  93      *
  94      * @param slot  the slot in the shutdown hook array, whose element
  95      *              will be invoked in order during shutdown
  96      * @param registerShutdownInProgress true to allow the hook
  97      *        to be registered even if the shutdown is in progress.
  98      * @param hook  the hook to be registered
  99      *
 100      * @throws IllegalStateException if shutdown is in progress and
 101      *         the slot is not valid to register.
 102      */
 103     void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
 104 
 105     /**
 106      * Returns the number of stack frames represented by the given throwable.
 107      */
 108     int getStackTraceDepth(Throwable t);
 109 
 110     /**
 111      * Returns the ith StackTraceElement for the given throwable.
 112      */
 113     StackTraceElement getStackTraceElement(Throwable t, int i);
 114 
 115     /**
 116      * Returns a new string backed by the provided character array. The
 117      * character array is not copied and must never be modified after the
 118      * String is created, in order to fulfill String's contract.
 119      *
 120      * @param chars the character array to back the string
 121      * @return a newly created string whose content is the character array
 122      */
 123     String newStringUnsafe(char[] chars);
 124 
 125     /**
 126      * Returns a new Thread with the given Runnable and an
 127      * inherited AccessControlContext.
 128      */
 129     Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
 130 
 131     /**
 132      * Invokes the finalize method of the given object.
 133      */
 134     void invokeFinalize(Object o) throws Throwable;
 135 


  86     /**
  87      * Registers a shutdown hook.
  88      *
  89      * It is expected that this method with registerShutdownInProgress=true
  90      * is only used to register DeleteOnExitHook since the first file
  91      * may be added to the delete on exit list by the application shutdown
  92      * hooks.
  93      *
  94      * @param slot  the slot in the shutdown hook array, whose element
  95      *              will be invoked in order during shutdown
  96      * @param registerShutdownInProgress true to allow the hook
  97      *        to be registered even if the shutdown is in progress.
  98      * @param hook  the hook to be registered
  99      *
 100      * @throws IllegalStateException if shutdown is in progress and
 101      *         the slot is not valid to register.
 102      */
 103     void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
 104 
 105     /**










 106      * Returns a new string backed by the provided character array. The
 107      * character array is not copied and must never be modified after the
 108      * String is created, in order to fulfill String's contract.
 109      *
 110      * @param chars the character array to back the string
 111      * @return a newly created string whose content is the character array
 112      */
 113     String newStringUnsafe(char[] chars);
 114 
 115     /**
 116      * Returns a new Thread with the given Runnable and an
 117      * inherited AccessControlContext.
 118      */
 119     Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
 120 
 121     /**
 122      * Invokes the finalize method of the given object.
 123      */
 124     void invokeFinalize(Object o) throws Throwable;
 125 
< prev index next >