Java Doc for DataCommon.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » xml » internal » 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 » Laszlo 4.0.10 » org.openlaszlo.xml.internal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openlaszlo.xml.internal.DataCommon

All known Subclasses:   org.openlaszlo.xml.internal.DataCompiler,
DataCommon
abstract public class DataCommon (Code)
Common data compiler routines between DataCompiler (XML compiler) and DataBuilder (Java API)
author:
   Henry Minsky
version:
   1.0


Field Summary
public static  StringBODY_NODE_INSTANTIATOR_FN
    
public static  StringNODE_INSTANTIATOR_FN
    
public static  StringRESULTSET_NODE_INSTANTIATOR_FN
    
public static  StringROOT_NODE_FINAL_FN
    
public static  StringROOT_NODE_INSTANTIATOR_FN
    
public static  StringTEXT_INSTANTIATOR_FN
    


Method Summary
final public static  void_pushMergedStringData(String s, FlashBuffer body, DataContext dc)
     Push a reference to string data on stack.
final public static  void_pushMergedStringDataSymbol(String s, FlashBuffer body, DataContext dc)
     Push a reference to string data on stack.
final public static  void_pushStringData(String s, FlashBuffer body, DataContext dc)
     Push a reference to string data on stack.
final public static  void_writeOffset(int o, FlashBuffer fb)
     Writes a string offset from the constant pool to a flash buffer.
final public static  intaddStringConstant(String s, DataContext dc)
     Intern a string in the constant pool.
public static  intgetByteLength(String s, String encoding)
    
final public static  intgetStringIndex(String s, DataContext dc)
    
final public static  intinternString(String s, DataContext dc)
    
final public static  byte[]makeStringPool(DataContext dc)
     Return byte array containing the strings from the constant pool, sorted and zero terminated.
final public static  intmaybeInternString(String s, DataContext dc)
     Intern a string in the constant pool, but only if it has been seen once before.
public static  voidprintProgram(Program program)
     For debugging, to print out a Program as hex values.
final public static  voidpushMergedStringData(String s, FlashBuffer body, DataContext dc)
     Push a reference to string data on stack.
final public static  voidpushMergedStringDataSymbol(String s, FlashBuffer body, DataContext dc)
     Push a reference to string data on stack.
final public static  voidpushStringData(String s, FlashBuffer body, DataContext dc)
     Push a reference to string data on stack.
final public static  voidwriteFlashData(FlashBuffer body, byte[] data, int destPos)
    
final public static  voidwriteOffset(int o, FlashBuffer fb)
    

Field Detail
BODY_NODE_INSTANTIATOR_FN
public static String BODY_NODE_INSTANTIATOR_FN(Code)



NODE_INSTANTIATOR_FN
public static String NODE_INSTANTIATOR_FN(Code)



RESULTSET_NODE_INSTANTIATOR_FN
public static String RESULTSET_NODE_INSTANTIATOR_FN(Code)



ROOT_NODE_FINAL_FN
public static String ROOT_NODE_FINAL_FN(Code)



ROOT_NODE_INSTANTIATOR_FN
public static String ROOT_NODE_INSTANTIATOR_FN(Code)



TEXT_INSTANTIATOR_FN
public static String TEXT_INSTANTIATOR_FN(Code)





Method Detail
_pushMergedStringData
final public static void _pushMergedStringData(String s, FlashBuffer body, DataContext dc)(Code)
Push a reference to string data on stack. maybeInternString uses a heuristic to decide whether to add the string constant pool, so this may push a string literal or a dictionary ref.

This version of the method uses the faster _writeXXX() methods, which do not do bounds checks on the FlashBuffer. So this should only be used in situations where we know the FlashBuffer is already allocated with enough space for any data we may push.




_pushMergedStringDataSymbol
final public static void _pushMergedStringDataSymbol(String s, FlashBuffer body, DataContext dc)(Code)
Push a reference to string data on stack. Attempts to intern in the string pool pool, so this may push a string literal or a dictionary ref. This routine uses the _writeXXX routines, which bypass FlashBuffer's ensureCapacity(), so the FlashBuffer must have been allocated with enough space for these writes, or an ArrayBoundsException may happen.



_pushStringData
final public static void _pushStringData(String s, FlashBuffer body, DataContext dc)(Code)
Push a reference to string data on stack. maybeInternString uses a heuristic to decide whether to add the string constant pool, so this may push a string literal or a dictionary ref. This version of the method uses the faster _writeXXX() methods, which do not do bounds checks on the FlashBuffer. So this should only be used in situations where we know the FlashBuffer is already allocated with enough space for any data we may push.



_writeOffset
final public static void _writeOffset(int o, FlashBuffer fb)(Code)
Writes a string offset from the constant pool to a flash buffer. This uses _writeXXX which bypasses the FlashBuffer ensureCapacity() check (for speed) so you must make sure the FlashBuffer is large enough to write these bytes.
Parameters:
  o - dictionary string index to write to flash buffer



addStringConstant
final public static int addStringConstant(String s, DataContext dc)(Code)
Intern a string in the constant pool.
Parameters:
  s - the string
Parameters:
  dc - offset into string pool



getByteLength
public static int getByteLength(String s, String encoding)(Code)



getStringIndex
final public static int getStringIndex(String s, DataContext dc)(Code)
the index of the string in the constant pool.



internString
final public static int internString(String s, DataContext dc)(Code)
Intern a string in the constant pool
Parameters:
  s - the string
Parameters:
  dc - the offset into string pool, or -1 if the string pool is full



makeStringPool
final public static byte[] makeStringPool(DataContext dc)(Code)
Return byte array containing the strings from the constant pool, sorted and zero terminated.



maybeInternString
final public static int maybeInternString(String s, DataContext dc)(Code)
Intern a string in the constant pool, but only if it has been seen once before.
Parameters:
  s - the string
Parameters:
  dc - the offset into string pool, or -1 if we decided not to intern it yet



printProgram
public static void printProgram(Program program)(Code)
For debugging, to print out a Program as hex values.



pushMergedStringData
final public static void pushMergedStringData(String s, FlashBuffer body, DataContext dc)(Code)
Push a reference to string data on stack. maybeInternString uses a heuristic to decide whether to add the string constant pool, so this may push a string literal or a dictionary ref.

This method is used when composing the arguments for a PUSH merges several args on the stack with a single PUSH instruction, and writes out only the data or constant-pool index reference, as opposed to the pushStringData() method which also writes out the PUSH instruction itsef.




pushMergedStringDataSymbol
final public static void pushMergedStringDataSymbol(String s, FlashBuffer body, DataContext dc)(Code)
Push a reference to string data on stack. Always attempts to intern in the string pool, so this may push a string literal or a dictionary ref.

This method is designed to be called when pushing references to strings which we are pretty sure will occur again, such as tag names or attribute names. We try to put them into the string pool immediately, as opposed to using the heuristic of waiting until the string is seen again before interning it.




pushStringData
final public static void pushStringData(String s, FlashBuffer body, DataContext dc)(Code)
Push a reference to string data on stack. maybeInternString uses a heuristic to decide whether to add the string constant pool, so this may push a string literal or a dictionary ref.



writeFlashData
final public static void writeFlashData(FlashBuffer body, byte[] data, int destPos)(Code)
Copy data from a a byte array into a FlashBuffer



writeOffset
final public static void writeOffset(int o, FlashBuffer fb)(Code)
Writes a string offset from the constant pool to a flash buffer
Parameters:
  o - dictionary string index to write to flash buffer



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.