Java Doc for VMBridge.java in  » Scripting » rhino » org » mozilla » javascript » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » rhino » org.mozilla.javascript 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mozilla.javascript.VMBridge

All known Subclasses:   org.mozilla.javascript.jdk13.VMBridge_jdk13,  org.mozilla.javascript.jdk11.VMBridge_jdk11,
VMBridge
abstract public class VMBridge (Code)


Field Summary
final static  VMBridgeinstance
    


Method Summary
abstract protected  ContextgetContext(Object contextHelper)
     Get Context instance associated with the current thread or null if none.
abstract protected  ClassLoadergetCurrentThreadClassLoader()
     Return the ClassLoader instance associated with the current thread.
protected  ObjectgetInterfaceProxyHelper(ContextFactory cf, Class[] interfaces)
     Create helper object to create later proxies implementing the specified interfaces later.
public  IteratorgetJavaIterator(Context cx, Scriptable scope, Object obj)
     If "obj" is a java.util.Iterator or a java.lang.Iterable, return a wrapping as a JavaScript Iterator.
abstract protected  ObjectgetThreadContextHelper()
     Return a helper object to optimize Context access.
abstract protected  booleanisVarArgs(Member member)
     Returns whether or not a given member (method or constructor) has variable arguments.
protected  ObjectnewInterfaceProxy(Object proxyHelper, ContextFactory cf, InterfaceAdapter adapter, Object target, Scriptable topScope)
     Create proxy object for InterfaceAdapter .
abstract protected  voidsetContext(Object contextHelper, Context cx)
     Associate Context instance with the current thread or remove the current association if cx is null.
abstract protected  booleantryToMakeAccessible(Object accessibleObject)
     In many JVMSs, public methods in private classes are not accessible by default (Sun Bug #4071593).

Field Detail
instance
final static VMBridge instance(Code)





Method Detail
getContext
abstract protected Context getContext(Object contextHelper)(Code)
Get Context instance associated with the current thread or null if none.
Parameters:
  contextHelper - The result of VMBridge.getThreadContextHelper()called from the current thread.



getCurrentThreadClassLoader
abstract protected ClassLoader getCurrentThreadClassLoader()(Code)
Return the ClassLoader instance associated with the current thread.



getInterfaceProxyHelper
protected Object getInterfaceProxyHelper(ContextFactory cf, Class[] interfaces)(Code)
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 });
 

Parameters:
  interfaces - Array with one or more interface class objects.



getJavaIterator
public Iterator getJavaIterator(Context cx, Scriptable scope, Object obj)(Code)
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.



getThreadContextHelper
abstract protected Object getThreadContextHelper()(Code)
Return a helper object to optimize Context access.

The runtime will pass the resulting helper object to the subsequent calls to VMBridge.getContext(Object contextHelper) and VMBridge.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.




isVarArgs
abstract protected boolean isVarArgs(Member member)(Code)
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
protected Object newInterfaceProxy(Object proxyHelper, ContextFactory cf, InterfaceAdapter adapter, Object target, Scriptable topScope)(Code)
Create proxy object for InterfaceAdapter . The proxy should call InterfaceAdapter.invoke(ContextFactory cfObject targetScriptable topScopeMethod methodObject[] args) as implementation of interface methods associated with proxyHelper.
Parameters:
  proxyHelper - The result of the previous call toVMBridge.getInterfaceProxyHelper(ContextFactory,Class[]).



setContext
abstract protected void setContext(Object contextHelper, Context cx)(Code)
Associate Context instance with the current thread or remove the current association if cx is null.
Parameters:
  contextHelper - The result of VMBridge.getThreadContextHelper()called from the current thread.



tryToMakeAccessible
abstract protected boolean tryToMakeAccessible(Object accessibleObject)(Code)
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. true if it was possible to make method accessibleor false otherwise.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.