Package org.jctools.channels.proxy
Class DefineClassHelper
- java.lang.Object
-
- org.jctools.channels.proxy.DefineClassHelper
-
final class DefineClassHelper extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
DefineClassHelper.DefineClassStrategy
private static class
DefineClassHelper.UsingMethodHandles
private static class
DefineClassHelper.UsingUnsafe
-
Field Summary
Fields Modifier and Type Field Description private static DefineClassHelper.DefineClassStrategy
DEFINE_CLASS_STRATEGY
-
Constructor Summary
Constructors Constructor Description DefineClassHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.Class<?>
defineClass(java.lang.Class<?> iFace, java.lang.String name, byte[] bytes)
private static DefineClassHelper.DefineClassStrategy
initialize()
private static DefineClassHelper.DefineClassStrategy
usingMethodHandles()
Should be available from JDK 1.9 and laterprivate static DefineClassHelper.DefineClassStrategy
usingUnsafe()
-
-
-
Field Detail
-
DEFINE_CLASS_STRATEGY
private static final DefineClassHelper.DefineClassStrategy DEFINE_CLASS_STRATEGY
-
-
Method Detail
-
initialize
private static DefineClassHelper.DefineClassStrategy initialize()
-
usingUnsafe
private static DefineClassHelper.DefineClassStrategy usingUnsafe() throws java.lang.Exception
- Throws:
java.lang.Exception
-
usingMethodHandles
private static DefineClassHelper.DefineClassStrategy usingMethodHandles() throws java.lang.Exception
Should be available from JDK 1.9 and later- Returns:
- a strategy for calling defineClass
- Throws:
java.lang.Exception
- if anything goes wrong
-
defineClass
static java.lang.Class<?> defineClass(java.lang.Class<?> iFace, java.lang.String name, byte[] bytes)
-
-