< prev index next >

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

Print this page




 131      */
 132     Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
 133 
 134     /**
 135      * Invokes the finalize method of the given object.
 136      */
 137     void invokeFinalize(Object o) throws Throwable;
 138 
 139     /**
 140      * Returns the ConcurrentHashMap used as a storage for ClassLoaderValue(s)
 141      * associated with the given class loader, creating it if it doesn't already exist.
 142      */
 143     ConcurrentHashMap<?, ?> createOrGetClassLoaderValueMap(ClassLoader cl);
 144 
 145     /**
 146      * Defines a class with the given name to a class loader.
 147      */
 148     Class<?> defineClass(ClassLoader cl, String name, byte[] b, ProtectionDomain pd, String source);
 149 
 150     /**








 151      * Returns a class loaded by the bootstrap class loader.
 152      */
 153     Class<?> findBootstrapClassOrNull(ClassLoader cl, String name);
 154 
 155     /**
 156      * Define a Package of the given name and module by the given class loader.
 157      */
 158     Package definePackage(ClassLoader cl, String name, Module module);
 159 
 160     /**
 161      * Invokes Long.fastUUID
 162      */
 163     String fastUUID(long lsb, long msb);
 164 
 165     /**
 166      * Record the non-exported packages of the modules in the given layer
 167      */
 168     void addNonExportedPackages(ModuleLayer layer);
 169 
 170     /**


 288     byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException;
 289 
 290     /**
 291      * Returns a new string by decoding from the given utf8 bytes array.
 292      *
 293      * @param off the index of the first byte to decode
 294      * @param len the number of bytes to decode
 295      * @return the newly created string
 296      * @throws IllegalArgumentException for malformed or unmappable bytes.
 297      */
 298     String newStringUTF8NoRepl(byte[] bytes, int off, int len);
 299 
 300     /**
 301      * Encode the given string into a sequence of bytes using utf8.
 302      *
 303      * @param s the string to encode
 304      * @return the encoded bytes in utf8
 305      * @throws IllegalArgumentException for malformed surrogates
 306      */
 307     byte[] getBytesUTF8NoRepl(String s);





 308 
 309     /**
 310      * Set the cause of Throwable
 311      * @param cause set t's cause to new value
 312      */
 313     void setCause(Throwable t, Throwable cause);
 314 }


 131      */
 132     Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
 133 
 134     /**
 135      * Invokes the finalize method of the given object.
 136      */
 137     void invokeFinalize(Object o) throws Throwable;
 138 
 139     /**
 140      * Returns the ConcurrentHashMap used as a storage for ClassLoaderValue(s)
 141      * associated with the given class loader, creating it if it doesn't already exist.
 142      */
 143     ConcurrentHashMap<?, ?> createOrGetClassLoaderValueMap(ClassLoader cl);
 144 
 145     /**
 146      * Defines a class with the given name to a class loader.
 147      */
 148     Class<?> defineClass(ClassLoader cl, String name, byte[] b, ProtectionDomain pd, String source);
 149 
 150     /**
 151      * Defines a class with the given name to a class loader with
 152      * the given flags and class data.
 153      *
 154      * @see java.lang.invoke.MethodHandles.Lookup#defineClass
 155      */
 156     Class<?> defineClass(ClassLoader cl, Class<?> lookup, String name, byte[] b, ProtectionDomain pd, int flags, Object classData);
 157 
 158     /**
 159      * Returns a class loaded by the bootstrap class loader.
 160      */
 161     Class<?> findBootstrapClassOrNull(ClassLoader cl, String name);
 162 
 163     /**
 164      * Define a Package of the given name and module by the given class loader.
 165      */
 166     Package definePackage(ClassLoader cl, String name, Module module);
 167 
 168     /**
 169      * Invokes Long.fastUUID
 170      */
 171     String fastUUID(long lsb, long msb);
 172 
 173     /**
 174      * Record the non-exported packages of the modules in the given layer
 175      */
 176     void addNonExportedPackages(ModuleLayer layer);
 177 
 178     /**


 296     byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException;
 297 
 298     /**
 299      * Returns a new string by decoding from the given utf8 bytes array.
 300      *
 301      * @param off the index of the first byte to decode
 302      * @param len the number of bytes to decode
 303      * @return the newly created string
 304      * @throws IllegalArgumentException for malformed or unmappable bytes.
 305      */
 306     String newStringUTF8NoRepl(byte[] bytes, int off, int len);
 307 
 308     /**
 309      * Encode the given string into a sequence of bytes using utf8.
 310      *
 311      * @param s the string to encode
 312      * @return the encoded bytes in utf8
 313      * @throws IllegalArgumentException for malformed surrogates
 314      */
 315     byte[] getBytesUTF8NoRepl(String s);
 316 
 317     /**
 318      * Get protection domain of the given Class
 319      */
 320     ProtectionDomain protectionDomain(Class<?> c);
 321 
 322     /**
 323      * Set the cause of Throwable
 324      * @param cause set t's cause to new value
 325      */
 326     void setCause(Throwable t, Throwable cause);
 327 }
< prev index next >