17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.internal.access;
27
28 import java.lang.annotation.Annotation;
29 import java.lang.module.ModuleDescriptor;
30 import java.lang.reflect.Executable;
31 import java.lang.reflect.Method;
32 import java.net.URI;
33 import java.nio.charset.CharacterCodingException;
34 import java.nio.charset.Charset;
35 import java.security.AccessControlContext;
36 import java.security.ProtectionDomain;
37 import java.util.Iterator;
38 import java.util.List;
39 import java.util.Map;
40 import java.util.Set;
41 import java.util.concurrent.ConcurrentHashMap;
42 import java.util.stream.Stream;
43
44 import jdk.internal.module.ServicesCatalog;
45 import jdk.internal.reflect.ConstantPool;
46 import sun.reflect.annotation.AnnotationType;
47 import sun.nio.ch.Interruptible;
48
49 public interface JavaLangAccess {
50
51 /**
52 * Returns the list of {@code Method} objects for the declared public
53 * methods of this class or interface that have the specified method name
54 * and parameter types.
55 */
56 List<Method> getDeclaredPublicMethods(Class<?> klass, String name, Class<?>... parameterTypes);
57
295 * @param len the number of bytes to decode
296 * @return the newly created string
297 * @throws IllegalArgumentException for malformed or unmappable bytes.
298 */
299 String newStringUTF8NoRepl(byte[] bytes, int off, int len);
300
301 /**
302 * Encode the given string into a sequence of bytes using utf8.
303 *
304 * @param s the string to encode
305 * @return the encoded bytes in utf8
306 * @throws IllegalArgumentException for malformed surrogates
307 */
308 byte[] getBytesUTF8NoRepl(String s);
309
310 /**
311 * Set the cause of Throwable
312 * @param cause set t's cause to new value
313 */
314 void setCause(Throwable t, Throwable cause);
315
316 /**
317 * Privileged System.loadLibrary
318 *
319 * @param caller on behalf of which the library is being loaded
320 * @param library name of the library to load
321 */
322 void loadLibrary(Class<?> caller, String library);
323 }
|
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.internal.access;
27
28 import java.lang.annotation.Annotation;
29 import java.lang.module.ModuleDescriptor;
30 import java.lang.reflect.Executable;
31 import java.lang.reflect.Method;
32 import java.net.URI;
33 import java.nio.charset.CharacterCodingException;
34 import java.nio.charset.Charset;
35 import java.security.AccessControlContext;
36 import java.security.ProtectionDomain;
37 import java.util.List;
38 import java.util.Map;
39 import java.util.Set;
40 import java.util.concurrent.ConcurrentHashMap;
41 import java.util.stream.Stream;
42
43 import jdk.internal.module.ServicesCatalog;
44 import jdk.internal.reflect.ConstantPool;
45 import sun.reflect.annotation.AnnotationType;
46 import sun.nio.ch.Interruptible;
47
48 public interface JavaLangAccess {
49
50 /**
51 * Returns the list of {@code Method} objects for the declared public
52 * methods of this class or interface that have the specified method name
53 * and parameter types.
54 */
55 List<Method> getDeclaredPublicMethods(Class<?> klass, String name, Class<?>... parameterTypes);
56
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 }
|