Java Doc for LowLevelSaf.java in  » Ajax » GWT » com » google » gwt » dev » shell » mac » 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 » Ajax » GWT » com.google.gwt.dev.shell.mac 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.google.gwt.dev.shell.mac.LowLevelSaf

LowLevelSaf
public class LowLevelSaf (Code)
Various low-level helper methods for dealing with Safari. The basic rule is that any JSValue passed to Java code from native code will always be GC-protected in the native code and Java will always unprotect it when the value is finalized. It should always be stored in a JsValue object immediately to make sure it is cleaned up properly when it is no longer needed. This approach is required to avoid a race condition where the value is allocated in JNI code but could be garbage collected before Java takes ownership of the value. Java values passed into JavaScript store a GlobalRef of a WebKitDispatchAdapter or MethodDispatch objects, which are freed when the JS value is finalized.

Inner Class :public interface DispatchMethod
Inner Class :public interface DispatchObject

Field Summary
final static  booleandebugObjectCreation
     Flag to enable tracking of object creation sites.


Method Summary
public static  booleancoerceToBoolean(int execState, int jsval)
    
public static  bytecoerceToByte(int execState, int jsval)
    
public static  charcoerceToChar(int execState, int jsval)
    
public static  doublecoerceToDouble(int execState, int jsval)
    
public static  floatcoerceToFloat(int execState, int jsval)
    
public static  intcoerceToInt(int execState, int jsval)
    
public static  longcoerceToLong(int execState, int jsval)
    
public static  shortcoerceToShort(int execState, int jsval)
    
public static  StringcoerceToString(int execState, int jsval)
    
public static  intconvertBoolean(boolean v)
    
public static  intconvertDouble(double v)
    
public static  intconvertString(String v)
    
public static  voidexecuteScript(int execState, String code)
     Executes JavaScript code.
public static  voidexecuteScriptWithInfo(int execState, String code, String file, int line)
     Executes JavaScript code, retaining file and line information.
public static  voidgcLock(int jsval)
    
public static  voidgcUnlock(int jsval, Throwable creationStackTrace)
    
public static  intgetExecState()
    
public static  intgetGlobalExecState(int scriptObject)
    
public static  String[]getProcessArgs()
    
native public static  StringgetTypeString(int jsval)
    
public static synchronized  voidinit()
    
public static  intinvoke(int execState, int scriptObject, String methodName, int jsthis, int[] jsargs)
     Invokes a method implemented in JavaScript.
native public static  booleanisBoolean(int jsval)
    
native public static  booleanisNull(int jsval)
    
native public static  booleanisNumber(int jsval)
    
public static  booleanisObject(int jsval)
    
public static  booleanisString(int jsval)
    
native public static  booleanisUndefined(int jsval)
    
public static  booleanisWrappedDispatch(int jsval)
    
public static  voidjsLock()
     Locks the JavaScript interpreter into this thread; prevents the garbage collector from running.
native public static  intjsNull()
    
native public static  intjsUndefined()
    
public static  voidjsUnlock()
     Unlocks the JavaScript interpreter.
public static  voidpopExecState(int execState)
    
public static  voidpushExecState(int execState)
    
public static  voidraiseJavaScriptException(int execState, int jsval)
     Call this to raise an exception in JavaScript before returning control.
protected static  voidtrace(String s)
     Called from native code to do tracing.
public static  DispatchObjectunwrapDispatch(int jsval)
     Unwraps a wrapped DispatchObject.
public static  intwrapDispatch(DispatchObject dispObj)
    
public static  intwrapFunction(String name, DispatchMethod dispMeth)
    

Field Detail
debugObjectCreation
final static boolean debugObjectCreation(Code)
Flag to enable tracking of object creation sites. Package-protected to allow JsValueSaf to use it as well.





Method Detail
coerceToBoolean
public static boolean coerceToBoolean(int execState, int jsval)(Code)



coerceToByte
public static byte coerceToByte(int execState, int jsval)(Code)



coerceToChar
public static char coerceToChar(int execState, int jsval)(Code)



coerceToDouble
public static double coerceToDouble(int execState, int jsval)(Code)



coerceToFloat
public static float coerceToFloat(int execState, int jsval)(Code)



coerceToInt
public static int coerceToInt(int execState, int jsval)(Code)



coerceToLong
public static long coerceToLong(int execState, int jsval)(Code)



coerceToShort
public static short coerceToShort(int execState, int jsval)(Code)



coerceToString
public static String coerceToString(int execState, int jsval)(Code)



convertBoolean
public static int convertBoolean(boolean v)(Code)



convertDouble
public static int convertDouble(double v)(Code)



convertString
public static int convertString(String v)(Code)



executeScript
public static void executeScript(int execState, String code)(Code)
Executes JavaScript code.
Parameters:
  execState - An opaque handle to the script frame window
Parameters:
  code - The JavaScript code to execute



executeScriptWithInfo
public static void executeScriptWithInfo(int execState, String code, String file, int line)(Code)
Executes JavaScript code, retaining file and line information.
Parameters:
  execState - An opaque handle to the script frame window
Parameters:
  code - The JavaScript code to execute
Parameters:
  file - A file name associated with the code
Parameters:
  line - A line number associated with the code.



gcLock
public static void gcLock(int jsval)(Code)



gcUnlock
public static void gcUnlock(int jsval, Throwable creationStackTrace)(Code)



getExecState
public static int getExecState()(Code)



getGlobalExecState
public static int getGlobalExecState(int scriptObject)(Code)



getProcessArgs
public static String[] getProcessArgs()(Code)



getTypeString
native public static String getTypeString(int jsval)(Code)



init
public static synchronized void init()(Code)



invoke
public static int invoke(int execState, int scriptObject, String methodName, int jsthis, int[] jsargs)(Code)
Invokes a method implemented in JavaScript.
Parameters:
  execState - an opaque handle to the script frame window
Parameters:
  methodName - the method name on jsthis to call
Parameters:
  jsthis - a wrapped java object as a jsval
Parameters:
  jsargs - the arguments to pass to the method the result of the invocation



isBoolean
native public static boolean isBoolean(int jsval)(Code)

Parameters:
  jsval - the js value in question true if the value is a boolean value



isNull
native public static boolean isNull(int jsval)(Code)

Parameters:
  jsval - the js value in question true if the value is the null value



isNumber
native public static boolean isNumber(int jsval)(Code)

Parameters:
  jsval - the js value in question true if the value is a boolean value



isObject
public static boolean isObject(int jsval)(Code)
Is the jsval a JSObject?
Parameters:
  jsval - the value true if jsval is a JSObject



isString
public static boolean isString(int jsval)(Code)
Is the jsval a string primitive?
Parameters:
  jsval - the value true if the jsval is a string primitive



isUndefined
native public static boolean isUndefined(int jsval)(Code)

Parameters:
  jsval - the js value in question true if the value is the undefined value



isWrappedDispatch
public static boolean isWrappedDispatch(int jsval)(Code)
Is the jsval JSObject a wrapped DispatchObject?
Parameters:
  jsval - the value true if the JSObject is a wrapped DispatchObject



jsLock
public static void jsLock()(Code)
Locks the JavaScript interpreter into this thread; prevents the garbage collector from running. DON'T CALL THIS THREAD WITHOUT PUTTING A CALL TO JSUNLOCK INSIDE OF A FINALLY BLOCK OR YOU WILL LOCK THE BROWSER.



jsNull
native public static int jsNull()(Code)
the null value



jsUndefined
native public static int jsUndefined()(Code)
the undefined value



jsUnlock
public static void jsUnlock()(Code)
Unlocks the JavaScript interpreter. Call this method from a finally block whenever you call jsLock.



popExecState
public static void popExecState(int execState)(Code)



pushExecState
public static void pushExecState(int execState)(Code)



raiseJavaScriptException
public static void raiseJavaScriptException(int execState, int jsval)(Code)
Call this to raise an exception in JavaScript before returning control.
Parameters:
  execState - An opaque handle to the script frame window



trace
protected static void trace(String s)(Code)
Called from native code to do tracing.
Parameters:
  s - the string to trace



unwrapDispatch
public static DispatchObject unwrapDispatch(int jsval)(Code)
Unwraps a wrapped DispatchObject.
Parameters:
  jsval - a value previously returned from wrapDispatch the original DispatchObject



wrapDispatch
public static int wrapDispatch(DispatchObject dispObj)(Code)

Parameters:
  dispObj - the DispatchObject to wrap the wrapped object as a jsval JSObject



wrapFunction
public static int wrapFunction(String name, DispatchMethod dispMeth)(Code)

Parameters:
  name - method name.
Parameters:
  dispMeth - the DispatchMethod to wrap the wrapped method as a jsval JSObject



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.