Skip to content

Commit

Permalink
get unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
n9Mtq4 committed Aug 6, 2015
1 parent b6ab55a commit 951af03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/com/n9mtq4/reflection/ReflectionHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package com.n9mtq4.reflection;

import sun.misc.Unsafe;
import sun.net.www.protocol.file.FileURLConnection;

import java.io.File;
Expand Down Expand Up @@ -42,6 +43,15 @@
@SuppressWarnings("unused")
public class ReflectionHelper {

/**
* Gets the instance of Unsafe.
*
* @return the instance of Unsafe.
* */
public static Unsafe getUnsafe() {
return getStaticObject("theUnsafe", Unsafe.class);
}

/**
* Gets a int.
*
Expand Down

0 comments on commit 951af03

Please sign in to comment.