src/jdk.unsupported/share/classes/sun/misc/Unsafe.java
changeset 51798 f55a4bc91ef4
parent 49267 6889f13694c6
child 52220 9c260a6b6471
equal deleted inserted replaced
51797:3efead10e303 51798:f55a4bc91ef4
    31 import jdk.internal.reflect.CallerSensitive;
    31 import jdk.internal.reflect.CallerSensitive;
    32 import jdk.internal.reflect.Reflection;
    32 import jdk.internal.reflect.Reflection;
    33 import sun.nio.ch.DirectBuffer;
    33 import sun.nio.ch.DirectBuffer;
    34 
    34 
    35 import java.lang.reflect.Field;
    35 import java.lang.reflect.Field;
       
    36 import java.util.Set;
    36 
    37 
    37 
    38 
    38 /**
    39 /**
    39  * A collection of methods for performing low-level, unsafe operations.
    40  * A collection of methods for performing low-level, unsafe operations.
    40  * Although the class and all methods are public, use of this class is
    41  * Although the class and all methods are public, use of this class is
    54  */
    55  */
    55 
    56 
    56 public final class Unsafe {
    57 public final class Unsafe {
    57 
    58 
    58     static {
    59     static {
    59         Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
    60         Reflection.registerMethodsToFilter(Unsafe.class, Set.of("getUnsafe"));
    60     }
    61     }
    61 
    62 
    62     private Unsafe() {}
    63     private Unsafe() {}
    63 
    64 
    64     private static final Unsafe theUnsafe = new Unsafe();
    65     private static final Unsafe theUnsafe = new Unsafe();