C# 클래스 Rhino.VMBridge

파일 보기 프로젝트 열기: hazzik/Rhino.Net

공개 메소드들

메소드 설명
GetJavaIterator ( Context cx, Scriptable scope, object obj ) : IEnumerator

If "obj" is a java.util.Iterator or a java.lang.Iterable, return a wrapping as a JavaScript Iterator.

If "obj" is a java.util.Iterator or a java.lang.Iterable, return a wrapping as a JavaScript Iterator. Otherwise, return null. This method is in VMBridge since Iterable is a JDK 1.5 addition.

보호된 메소드들

메소드 설명
GetContext ( object contextHelper ) : Context

Get Context instance associated with the current thread or null if none.

GetCurrentThreadClassLoader ( ) : ClassLoader

Return the ClassLoader instance associated with the current thread.

Return the ClassLoader instance associated with the current thread.

GetInterfaceProxyHelper ( ContextFactory cf, Type interfaces ) : object

Create helper object to create later proxies implementing the specified interfaces later.

Create helper object to create later proxies implementing the specified interfaces later. Under JDK 1.3 the implementation can look like:

 return java.lang.reflect.Proxy.getProxyClass(..., interfaces). getConstructor(new Class[] { java.lang.reflect.InvocationHandler.class }); 
GetThreadContextHelper ( ) : object

Return a helper object to optimize Context access.

The runtime will pass the resulting helper object to the subsequent calls to GetContext(object) and SetContext(object, Context) methods. In this way the implementation can use the helper to cache information about current thread to make Context access faster.

IsVarArgs ( MemberInfo member ) : bool

Returns whether or not a given member (method or constructor) has variable arguments.

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.

NewInterfaceProxy ( object proxyHelper, ContextFactory cf, InterfaceAdapter adapter, object target, Scriptable topScope ) : object

Create proxy object for InterfaceAdapter . The proxy should call InterfaceAdapter.Invoke(ContextFactory, object, Scriptable, object, System.Reflection.MethodInfo, object[]) as implementation of interface methods associated with proxyHelper.

SetContext ( object contextHelper, Context cx ) : void

Associate Context instance with the current thread or remove the current association if cx is null.

TryToMakeAccessible ( object accessibleObject ) : bool

In many JVMSs, public methods in private classes are not accessible by default (Sun Bug #4071593).

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.

비공개 메소드들

메소드 설명
MakeInstance ( ) : VMBridge

메소드 상세

GetContext() 보호된 추상적인 메소드

Get Context instance associated with the current thread or null if none.
protected abstract GetContext ( object contextHelper ) : Context
contextHelper object /// The result of /// GetThreadContextHelper() /// called from the current thread. ///
리턴 Context

GetCurrentThreadClassLoader() 보호된 추상적인 메소드

Return the ClassLoader instance associated with the current thread.
Return the ClassLoader instance associated with the current thread.
protected abstract GetCurrentThreadClassLoader ( ) : ClassLoader
리턴 ClassLoader

GetInterfaceProxyHelper() 보호된 메소드

Create helper object to create later proxies implementing the specified interfaces later.
Create helper object to create later proxies implementing the specified interfaces later. Under JDK 1.3 the implementation can look like:
 return java.lang.reflect.Proxy.getProxyClass(..., interfaces). getConstructor(new Class[] { java.lang.reflect.InvocationHandler.class }); 
protected GetInterfaceProxyHelper ( ContextFactory cf, Type interfaces ) : object
cf ContextFactory
interfaces System.Type Array with one or more interface class objects.
리턴 object

GetJavaIterator() 공개 메소드

If "obj" is a java.util.Iterator or a java.lang.Iterable, return a wrapping as a JavaScript Iterator.
If "obj" is a java.util.Iterator or a java.lang.Iterable, return a wrapping as a JavaScript Iterator. Otherwise, return null. This method is in VMBridge since Iterable is a JDK 1.5 addition.
public GetJavaIterator ( Context cx, Scriptable scope, object obj ) : IEnumerator
cx Context
scope Scriptable
obj object
리턴 IEnumerator

GetThreadContextHelper() 보호된 추상적인 메소드

Return a helper object to optimize Context access.

The runtime will pass the resulting helper object to the subsequent calls to GetContext(object) and SetContext(object, Context) methods. In this way the implementation can use the helper to cache information about current thread to make Context access faster.

protected abstract GetThreadContextHelper ( ) : object
리턴 object

IsVarArgs() 보호된 추상적인 메소드

Returns whether or not a given member (method or constructor) has variable arguments.
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.
protected abstract IsVarArgs ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
리턴 bool

NewInterfaceProxy() 보호된 메소드

Create proxy object for InterfaceAdapter . The proxy should call InterfaceAdapter.Invoke(ContextFactory, object, Scriptable, object, System.Reflection.MethodInfo, object[]) as implementation of interface methods associated with proxyHelper.
protected NewInterfaceProxy ( object proxyHelper, ContextFactory cf, InterfaceAdapter adapter, object target, Scriptable topScope ) : object
proxyHelper object /// The result of the previous call to /// GetInterfaceProxyHelper(ContextFactory, System.Type<T>[]) /// . ///
cf ContextFactory
adapter InterfaceAdapter
target object
topScope Scriptable
리턴 object

SetContext() 보호된 추상적인 메소드

Associate Context instance with the current thread or remove the current association if cx is null.
protected abstract SetContext ( object contextHelper, Context cx ) : void
contextHelper object /// The result of /// GetThreadContextHelper() /// called from the current thread. ///
cx Context
리턴 void

TryToMakeAccessible() 보호된 추상적인 메소드

In many JVMSs, public methods in private classes are not accessible by default (Sun Bug #4071593).
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.
protected abstract TryToMakeAccessible ( object accessibleObject ) : bool
accessibleObject object
리턴 bool