Java Doc for CompilationEnvironment.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.CompilationEnvironment

CompilationEnvironment
public class CompilationEnvironment (Code)
Encapsulates all the context that script compilation needs to refer to. Instances of this class are threaded through the calls to instances of CompilerNode. Also contains utility functions for compiling to a file.


Field Summary
final public static  StringBACKTRACE_PROPERTY
    
final public static  StringCONSOLEDEBUG_PROPERTY
    
final public static  StringCSSFILE_PROPERTY
    
final public static  StringDEBUG_PROPERTY
    
final public static  StringEMBEDFONTS_PROPERTY
    
final public static  StringLINK_PROPERTY
    
final public static  StringLOGDEBUG_PROPERTY
    
final public static  StringPROFILE_PROPERTY
    
final public static  StringPROXIED_PROPERTY
    
final public static  StringREMOTEDEBUG_PROPERTY
    
final public static  StringRUNTIME_PROPERTY
    
final public static  StringSOURCELOCATOR_PROPERTY
    
final public static  StringUSER_DEBUG_WINDOW
    
protected  FilemApplicationFile
     The root file being compiled.
protected  FilemObjectFile
    
final  SymbolGeneratormethodNameGenerator
    
public  HashMapparsedLibraryCache
    

Constructor Summary
 CompilationEnvironment(Properties properties, FileResolver resolver, CompilerMediaCache mcache)
     Constructs an instance.
 CompilationEnvironment(CompilationEnvironment srcEnv)
     Copy fields from an existing CompilationEnvironment.
public  CompilationEnvironment()
     Use this constructor for unit testing.

Method Summary
public  voidaddClassFontInfo(String classname, FontInfo info)
     Add canvas info.
public  voidaddId(String name, Element e)
    
public  voidaddResourceReference(String name, Element elt)
    
static  StringadjustRelativeURL(String string, File sourceDir, File destDir)
     If the argument is a relative URL with no host, return an URL that resolves to the same address relative to the destDir as the argument does relative to sourceDir.
 StringadjustRelativeURL(String string, Element elt)
     If the argument is a relative URL with no host, return an URL that resolves to the same address relative to the main source file as the argument does relative to the file that contains elt.
public  voidcheckValidChildContainment(Element element)
    
 voidcompileScript(String script)
     Compiles script to bytecodes, and adds them to the output file.
 voidcompileScript(String script, Element elt)
    
public  FilegetApplicationFile()
    
 booleangetBooleanProperty(String name)
    
public  CanvasgetCanvas()
    
public  FontInfogetClassFontInfo(String classname)
    
public  FontInfogetDefaultFontInfo()
    
public static synchronized  intgetDefaultTextWidth()
    
public  booleangetEmbedFonts()
    
public  CompilationErrorHandlergetErrorHandler()
    
 FileResolvergetFileResolver()
     Returns the file resolver used in this environment.
 ObjectWritergetGenerator()
     Returns the SWF writer that compilation within this environment writes to.
public  ElementgetId(String name)
    
 SetgetImportedLibraryFiles()
    
public  StringgetLibPrefix()
    
public  StringgetLibPrefixRelative()
    
 MapgetLoadableImportedLibraryFiles()
    
public  CompilerMediaCachegetMediaCache()
    
public  FilegetObjectFile()
    
 ParsergetParser()
    
 PropertiesgetProperties()
     Returns the Properties object used in this environment.
 StringgetProperty(String name)
    
 StringgetProperty(String name, String defval)
    
 ObjectWritergetResourceGenerator()
     By pointing at the main SWFWriter, this makes the resources compile into the main app.
 SetgetResourceNames()
    
public  StringgetRuntime()
    
public  StringgetRuntime(String defaultVersion)
    
public  intgetSWFVersionInt()
    
public  ViewSchemagetSchema()
    
public  booleanisCanvas()
    
public  booleanisDHTML()
    
public  booleanisImportLib()
     Returns true if we're compiling a loadable library file.
public  booleanisSWF()
    
 Fileresolve(String name, String base)
    
 FileresolveLibrary(String name, String base)
    
 FileresolveParentReference(Element element)
    
 FileresolveReference(Element element, String aname)
    
 FileresolveReference(Element element, String aname, boolean asLibrary)
     Resolve the value of the named attribute, relative to the source location of the element.
 FileresolveReference(Element elt)
     Resolve the value of the "src" attribute, relative to the source location of the element.
public  MapresourceReferences()
    
 voidsetApplicationFile(File file)
    
public  voidsetCanvas(Canvas canvas, String constructorScript)
    
public  voidsetDefaultFontInfo(FontInfo fi)
    
public  voidsetEmbedFonts(boolean embed)
    
public  voidsetImportLib(boolean v)
    
public  voidsetMainObjectWriter(ObjectWriter writer)
    
public  voidsetMediaCache(CompilerMediaCache cache)
    
 voidsetObjectFile(File file)
    
public  voidsetObjectWriter(ObjectWriter writer)
    
 voidsetProperty(String name, String value)
    
 voidsetProperty(String name, boolean value)
    
public  voidsetScriptLimits(int recursion, int timeout)
    
 StringuniqueName()
    
public  voidwarn(CompilationError e)
    
public  voidwarn(Throwable e, Element element)
    
public  voidwarn(String msg)
    
public  voidwarn(String msg, Element element)
    
public  booleanwarnIfCannotContain(Element parentTag, Element childTag)
    

Field Detail
BACKTRACE_PROPERTY
final public static String BACKTRACE_PROPERTY(Code)



CONSOLEDEBUG_PROPERTY
final public static String CONSOLEDEBUG_PROPERTY(Code)



CSSFILE_PROPERTY
final public static String CSSFILE_PROPERTY(Code)



DEBUG_PROPERTY
final public static String DEBUG_PROPERTY(Code)



EMBEDFONTS_PROPERTY
final public static String EMBEDFONTS_PROPERTY(Code)



LINK_PROPERTY
final public static String LINK_PROPERTY(Code)



LOGDEBUG_PROPERTY
final public static String LOGDEBUG_PROPERTY(Code)



PROFILE_PROPERTY
final public static String PROFILE_PROPERTY(Code)



PROXIED_PROPERTY
final public static String PROXIED_PROPERTY(Code)



REMOTEDEBUG_PROPERTY
final public static String REMOTEDEBUG_PROPERTY(Code)



RUNTIME_PROPERTY
final public static String RUNTIME_PROPERTY(Code)



SOURCELOCATOR_PROPERTY
final public static String SOURCELOCATOR_PROPERTY(Code)



USER_DEBUG_WINDOW
final public static String USER_DEBUG_WINDOW(Code)



mApplicationFile
protected File mApplicationFile(Code)
The root file being compiled. This is used to resolve relative pathnames.



mObjectFile
protected File mObjectFile(Code)



methodNameGenerator
final SymbolGenerator methodNameGenerator(Code)



parsedLibraryCache
public HashMap parsedLibraryCache(Code)
Cache for holding DOM tree from parsing library file




Constructor Detail
CompilationEnvironment
CompilationEnvironment(Properties properties, FileResolver resolver, CompilerMediaCache mcache)(Code)
Constructs an instance.
Parameters:
  properties - compilation properties
Parameters:
  resolver -
Parameters:
  mcache -



CompilationEnvironment
CompilationEnvironment(CompilationEnvironment srcEnv)(Code)
Copy fields from an existing CompilationEnvironment.



CompilationEnvironment
public CompilationEnvironment()(Code)
Use this constructor for unit testing. The Compiler uses the constructor that takes a FileResolver.




Method Detail
addClassFontInfo
public void addClassFontInfo(String classname, FontInfo info)(Code)
Add canvas info. It is an error to call this before calling setCanvas (hand will currently result in a null reference exception).



addId
public void addId(String name, Element e)(Code)



addResourceReference
public void addResourceReference(String name, Element elt)(Code)



adjustRelativeURL
static String adjustRelativeURL(String string, File sourceDir, File destDir)(Code)
If the argument is a relative URL with no host, return an URL that resolves to the same address relative to the destDir as the argument does relative to sourceDir. Otherwise return the argument unchanged.



adjustRelativeURL
String adjustRelativeURL(String string, Element elt)(Code)
If the argument is a relative URL with no host, return an URL that resolves to the same address relative to the main source file as the argument does relative to the file that contains elt. Otherwise return the argument unchanged.



checkValidChildContainment
public void checkValidChildContainment(Element element)(Code)
Check if all children are allowed to be contained in this tags



compileScript
void compileScript(String script)(Code)
Compiles script to bytecodes, and adds them to the output file.
Parameters:
  script - a script



compileScript
void compileScript(String script, Element elt)(Code)



getApplicationFile
public File getApplicationFile()(Code)



getBooleanProperty
boolean getBooleanProperty(String name)(Code)



getCanvas
public Canvas getCanvas()(Code)



getClassFontInfo
public FontInfo getClassFontInfo(String classname)(Code)



getDefaultFontInfo
public FontInfo getDefaultFontInfo()(Code)



getDefaultTextWidth
public static synchronized int getDefaultTextWidth()(Code)



getEmbedFonts
public boolean getEmbedFonts()(Code)



getErrorHandler
public CompilationErrorHandler getErrorHandler()(Code)



getFileResolver
FileResolver getFileResolver()(Code)
Returns the file resolver used in this environment. the object writer



getGenerator
ObjectWriter getGenerator()(Code)
Returns the SWF writer that compilation within this environment writes to. the object writer



getId
public Element getId(String name)(Code)



getImportedLibraryFiles
Set getImportedLibraryFiles()(Code)



getLibPrefix
public String getLibPrefix()(Code)



getLibPrefixRelative
public String getLibPrefixRelative()(Code)



getLoadableImportedLibraryFiles
Map getLoadableImportedLibraryFiles()(Code)



getMediaCache
public CompilerMediaCache getMediaCache()(Code)



getObjectFile
public File getObjectFile()(Code)



getParser
Parser getParser()(Code)



getProperties
Properties getProperties()(Code)
Returns the Properties object used in this environment. the properties



getProperty
String getProperty(String name)(Code)



getProperty
String getProperty(String name, String defval)(Code)



getResourceGenerator
ObjectWriter getResourceGenerator()(Code)
By pointing at the main SWFWriter, this makes the resources compile into the main app. We have to do this because we haven't figured out a way to get Flash to attach individual exported assets from a runtime loaded library into views in the main app. the object writer



getResourceNames
Set getResourceNames()(Code)



getRuntime
public String getRuntime()(Code)
Return target Flash version (5, 6, ...) *



getRuntime
public String getRuntime(String defaultVersion)(Code)



getSWFVersionInt
public int getSWFVersionInt()(Code)



getSchema
public ViewSchema getSchema()(Code)



isCanvas
public boolean isCanvas()(Code)



isDHTML
public boolean isDHTML()(Code)



isImportLib
public boolean isImportLib()(Code)
Returns true if we're compiling a loadable library file. isLibrary



isSWF
public boolean isSWF()(Code)



resolve
File resolve(String name, String base) throws FileNotFoundException(Code)



resolveLibrary
File resolveLibrary(String name, String base) throws FileNotFoundException(Code)



resolveParentReference
File resolveParentReference(Element element) throws CompilationError(Code)
Resolve the value of the parent node



resolveReference
File resolveReference(Element element, String aname) throws CompilationError(Code)



resolveReference
File resolveReference(Element element, String aname, boolean asLibrary) throws CompilationError(Code)
Resolve the value of the named attribute, relative to the source location of the element.



resolveReference
File resolveReference(Element elt) throws CompilationError(Code)
Resolve the value of the "src" attribute, relative to the source location of the element.



resourceReferences
public Map resourceReferences()(Code)



setApplicationFile
void setApplicationFile(File file)(Code)



setCanvas
public void setCanvas(Canvas canvas, String constructorScript)(Code)



setDefaultFontInfo
public void setDefaultFontInfo(FontInfo fi)(Code)



setEmbedFonts
public void setEmbedFonts(boolean embed)(Code)



setImportLib
public void setImportLib(boolean v)(Code)



setMainObjectWriter
public void setMainObjectWriter(ObjectWriter writer)(Code)



setMediaCache
public void setMediaCache(CompilerMediaCache cache)(Code)



setObjectFile
void setObjectFile(File file)(Code)



setObjectWriter
public void setObjectWriter(ObjectWriter writer)(Code)



setProperty
void setProperty(String name, String value)(Code)



setProperty
void setProperty(String name, boolean value)(Code)



setScriptLimits
public void setScriptLimits(int recursion, int timeout)(Code)



uniqueName
String uniqueName()(Code)
a unique name in the SWF



warn
public void warn(CompilationError e)(Code)



warn
public void warn(Throwable e, Element element)(Code)



warn
public void warn(String msg)(Code)



warn
public void warn(String msg, Element element)(Code)



warnIfCannotContain
public boolean warnIfCannotContain(Element parentTag, Element childTag)(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.