org.mozilla.javascript.jdk11
Class VMBridge_jdk11
public class VMBridge_jdk11
protected Context | getContext(Object contextHelper) - Get
Context instance associated with the current thread
or null if none.
|
protected ClassLoader | getCurrentThreadClassLoader() - Return the ClassLoader instance associated with the current thread.
|
protected Object | getThreadContextHelper() - Return a helper object to optimize
Context access.
|
protected boolean | isVarArgs(Member member) - Returns whether or not a given member (method or constructor)
has variable arguments.
|
protected void | setContext(Object contextHelper, Context cx) - Associate
Context instance with the current thread or remove
the current association if cx is null.
|
protected boolean | tryToMakeAccessible(Object accessibleObject) - In many JVMSs, public methods in private
classes are not accessible by default (Sun Bug #4071593).
|
getContext
protected Context getContext(Object contextHelper)
Get
Context
instance associated with the current thread
or null if none.
- getContext in interface VMBridge
getCurrentThreadClassLoader
protected ClassLoader getCurrentThreadClassLoader()
Return the ClassLoader instance associated with the current thread.
- getCurrentThreadClassLoader in interface VMBridge
getThreadContextHelper
protected Object getThreadContextHelper()
Return a helper object to optimize
Context
access.
The runtime will pass the resulting helper object to the subsequent
calls to
getContext(Object contextHelper)
and
setContext(Object contextHelper, Context cx)
methods.
In this way the implementation can use the helper to cache
information about current thread to make
Context
access faster.
- getThreadContextHelper in interface VMBridge
isVarArgs
protected boolean isVarArgs(Member member)
Returns whether or not a given member (method or constructor)
has variable arguments.
Variable argument methods have only been supported in Java since
JDK 1.5.
- isVarArgs in interface VMBridge
setContext
protected void setContext(Object contextHelper,
Context cx)
Associate
Context
instance with the current thread or remove
the current association if
cx is null.
- setContext in interface VMBridge
tryToMakeAccessible
protected boolean tryToMakeAccessible(Object accessibleObject)
In many JVMSs, public methods in private
classes are not accessible by default (Sun Bug #4071593).
VMBridge instance should try to workaround that via, for example,
calling method.setAccessible(true) when it is available.
The implementation is responsible to catch all possible exceptions
like SecurityException if the workaround is not available.
- tryToMakeAccessible in interface VMBridge
- true if it was possible to make method accessible
or false otherwise.