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


java.lang.Object
   org.openlaszlo.compiler.Compiler

Compiler
public class Compiler (Code)
Compiles a Laszlo XML source file, and any files that it references, into an object file that can be executed on the client. The compiler parses the file into XML, and then gets an element compiler for each toplevel element.


Field Summary
public static  ListKNOWN_RUNTIMES
    
public static  ListSCRIPT_RUNTIMES
    
public static  ListSWF_RUNTIMES
    
public static  LoggerSchemaLogger
     Set this to log the modified schema.
protected  FileResolvermFileResolver
     Called to resolve file references (src attributes).
protected  CompilerMediaCachemMediaCache
    
final protected  PropertiesmProperties
     See getProperties.


Method Summary
public  Canvascompile(File sourceFile, File objectFile, String url)
     Compiles sourceFile to objectFile.
public  Canvascompile(File sourceFile, File objectFile, Properties props)
     Compiles sourceFile to objectFile.
public  Canvascompile(File file, OutputStream ostr, Properties props, CompilationEnvironment env)
     Compiles file, and write the bytes to a stream.
public  voidcompileAndWriteToSWF(String script, String seqnum, OutputStream out, String runtime)
    
protected static  voidcompileElement(Element element, CompilationEnvironment env)
     Compile an XML element within the compilation environment.
 ObjectWritercreateObjectWriter(Properties props, OutputStream ostr, CompilationEnvironment env, Element root)
    
static  ElementCompilergetElementCompiler(Element element, CompilationEnvironment env)
    
public  FileResolvergetFileResolver()
    
public static  StringgetObjectFileExtensionForRuntime(String runtime)
    
public  StringgetProperty(String key)
     A Compiler's Properties stores properties that affect the compilation.
static  voidimportLibrary(File file, CompilationEnvironment env)
    
public  CompilationEnvironmentmakeCompilationEnvironment()
     Create a CompilationEnvironment with the properties and FileResolver of this compiler.
protected  voidprocessClassInstruction(CompilationEnvironment env, String className, ProcessingInstruction pi)
    
protected  voidprocessCompilerInstruction(CompilationEnvironment env, ProcessingInstruction pi)
    
protected  voidprocessCompilerInstructions(Element element, CompilationEnvironment env)
    
public  voidsetFileResolver(FileResolver resolver)
     Sets the file resolver for this compiler.
public  voidsetMediaCache(CompilerMediaCache cache)
     Sets the media cache for this compiler.
public  voidsetProperty(String key, String value)
    
static  voidupdateRootSchema(Element root, CompilationEnvironment env, ViewSchema schema, Set externalLibraries)
    
static  voidupdateSchema(Element element, CompilationEnvironment env, ViewSchema schema, Set visited)
    
static  voidupdateSchemaFromLibrary(File file, CompilationEnvironment env, ViewSchema schema, Set visited)
    

Field Detail
KNOWN_RUNTIMES
public static List KNOWN_RUNTIMES(Code)



SCRIPT_RUNTIMES
public static List SCRIPT_RUNTIMES(Code)



SWF_RUNTIMES
public static List SWF_RUNTIMES(Code)



SchemaLogger
public static Logger SchemaLogger(Code)
Set this to log the modified schema.



mFileResolver
protected FileResolver mFileResolver(Code)
Called to resolve file references (src attributes).



mMediaCache
protected CompilerMediaCache mMediaCache(Code)
CompilerMediaCache



mProperties
final protected Properties mProperties(Code)
See getProperties.





Method Detail
compile
public Canvas compile(File sourceFile, File objectFile, String url) throws CompilationError, IOException(Code)
Compiles sourceFile to objectFile. If compilation fails, objectFile is deleted.
Parameters:
  sourceFile - source File
Parameters:
  objectFile - a File to place object code in
Parameters:
  url - request url, ignore if null
throws:
  CompilationError - if an error occurs
throws:
  IOException - if an error occurs



compile
public Canvas compile(File sourceFile, File objectFile, Properties props) throws CompilationError, IOException(Code)
Compiles sourceFile to objectFile. If compilation fails, objectFile is deleted.
Parameters:
  sourceFile - source File
Parameters:
  objectFile - a File to place object code in
Parameters:
  props - parameters for the compile
throws:
  CompilationError - if an error occurs
throws:
  IOException - if an error occursThe PROPS parameters for the compile may include
  • url, optional, ignore if null
  • debug := "true" | "false" include debugger
  • logdebug := "true" | "false" makes debug.write() calls get logged to server



compile
public Canvas compile(File file, OutputStream ostr, Properties props, CompilationEnvironment env) throws CompilationError, IOException(Code)
Compiles file, and write the bytes to a stream.
Parameters:
  file - a File value
Parameters:
  ostr - an OutputStream value
Parameters:
  props - parameters for the compilation
exception:
  CompilationError - if an error occurs
exception:
  IOException - if an error occursThe parameters currently being looked for in the PROPS argare "debug", "logdebug", "profile", "krank"



compileAndWriteToSWF
public void compileAndWriteToSWF(String script, String seqnum, OutputStream out, String runtime)(Code)



compileElement
protected static void compileElement(Element element, CompilationEnvironment env) throws CompilationError(Code)
Compile an XML element within the compilation environment. Helper function for compile.
Parameters:
  element - an Element value
Parameters:
  env - a CompilationEnvironment value
exception:
  CompilationError - if an error occurs



createObjectWriter
ObjectWriter createObjectWriter(Properties props, OutputStream ostr, CompilationEnvironment env, Element root)(Code)



getElementCompiler
static ElementCompiler getElementCompiler(Element element, CompilationEnvironment env)(Code)



getFileResolver
public FileResolver getFileResolver()(Code)



getObjectFileExtensionForRuntime
public static String getObjectFileExtensionForRuntime(String runtime)(Code)



getProperty
public String getProperty(String key)(Code)
A Compiler's Properties stores properties that affect the compilation.
Name=defaultMeaning
trace.xml=falseDisplay XML that's compiled to script, and the script that it compiles to.
debug=trueAdd in debug features to the output.
trace.fonts=falseAdditional font traces.
swf.frame.rate=30Output SWF frame rate.
default.text.height=12Default text height for fonts.
text.borders=falseDisplay text borders in the output SWF for debugging.
Properties that one part of the compiler sets for another part to read:
Name=defaultMeaning
lzc_*Source location values.
a Properties value



importLibrary
static void importLibrary(File file, CompilationEnvironment env)(Code)



makeCompilationEnvironment
public CompilationEnvironment makeCompilationEnvironment()(Code)
Create a CompilationEnvironment with the properties and FileResolver of this compiler.



processClassInstruction
protected void processClassInstruction(CompilationEnvironment env, String className, ProcessingInstruction pi)(Code)



processCompilerInstruction
protected void processCompilerInstruction(CompilationEnvironment env, ProcessingInstruction pi)(Code)



processCompilerInstructions
protected void processCompilerInstructions(Element element, CompilationEnvironment env)(Code)



setFileResolver
public void setFileResolver(FileResolver resolver)(Code)
Sets the file resolver for this compiler. The file resolver is used to resolve the names used in include directives to files.
Parameters:
  resolver - a FileResolver



setMediaCache
public void setMediaCache(CompilerMediaCache cache)(Code)
Sets the media cache for this compiler.
Parameters:
  cache - a CompilerMediaCache



setProperty
public void setProperty(String key, String value)(Code)



updateRootSchema
static void updateRootSchema(Element root, CompilationEnvironment env, ViewSchema schema, Set externalLibraries)(Code)



updateSchema
static void updateSchema(Element element, CompilationEnvironment env, ViewSchema schema, Set visited)(Code)



updateSchemaFromLibrary
static void updateSchemaFromLibrary(File file, CompilationEnvironment env, ViewSchema schema, Set visited)(Code)



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.