Java Doc for JAXXCompiler.java in  » XML-UI » JAXX » jaxx » 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 » XML UI » JAXX » jaxx.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jaxx.compiler.JAXXCompiler

JAXXCompiler
public class JAXXCompiler (Code)
Compiles JAXX files into Java classes.


Field Summary
final public static  StringJAXX_INTERNAL_NAMESPACE
    
final public static  StringJAXX_NAMESPACE
    
final public static  booleanSTRICT_CHECKS
     True to throw exceptions when we encounter unresolvable classes, false to ignore.
public  StringBufferapplyDataBinding
     Body of the applyDataBinding method.
public  StringBufferbodyCode
     Extra code to be added to the class body.
public  StringBufferinitDataBindings
     Code to initialize data bindings.
public  StringBufferinitializer
     Extra code to be added to the instance initializer.
public  StringBufferlateInitializer
     Extra code to be added at the end of the instance initializer.
 booleanmainDeclared
    
public  StringBufferprocessDataBinding
     Body of the processDataBinding method.
public  StringBufferremoveDataBinding
     Body of the removeDataBinding method.

Constructor Summary
protected  JAXXCompiler(File baseDir, File src, String outputClassName, CompilerOptions options)
     Creates a new JAXXCompiler.

Method Summary
public static  FileURLtoFile(URL url)
    
public static  FileURLtoFile(String urlString)
    
public  voidaddDependencyClass(String className)
    
protected  voidaddEventHandlers(JavaFile javaFile)
    
public  voidaddImport(String text)
    
public  voidaddInlineStyle(CompiledObject object, String propertyName, boolean dataBinding)
    
protected  voidaddPropertyChangeSupport(JavaFile javaFile)
    
public  voidaddScriptField(FieldDescriptor field)
    
public  voidaddScriptMethod(MethodDescriptor method)
    
public static  Stringcapitalize(String s)
    
public  StringcheckJavaCode(String javaCode)
     Verifies that a snippet of Java code parses correctly.
public  voidcheckOverride(CompiledObject object)
    
public  voidcloseComponent(CompiledObject component)
    
public static synchronized  booleancompile(File base, String[] relativePaths, CompilerOptions options)
     Compiled a set of files, expressed as paths relative to a base directory.
public static synchronized  booleancompile(File[] files, String[] classNames, CompilerOptions options)
     Compiled a set of files, with the class names specified explicitly.
public  voidcompileFirstPass(Element tag)
    
public  voidcompileSecondPass(Element tag)
    
protected  JavaMethodcreateCompleteSetupMethod()
    
protected  JavaMethodcreateConstructor(String className)
    
public static  JAXXCompilercreateDummyCompiler()
     Creates a dummy JAXXCompiler for use in unit testing.
public static  JAXXCompilercreateDummyCompiler(ClassLoader classLoader)
     Creates a dummy JAXXCompiler for use in unit testing.
protected  JavaMethodcreateGetJAXXObjectDescriptorMethod()
    
protected  JavaMethodcreateGetObjectByIdMethod()
    
protected  JavaMethodcreateInitializer(String className)
    
protected  JavaFieldcreateJAXXObjectDescriptorField()
    
protected  voidcreateJavaFile(String packageName, String className)
    
protected  JavaMethodcreateProcessDataBindingMethod()
    
public static  StringescapeJavaString(String raw)
     Escapes a string using standard Java escape sequences, generally in preparation to including it in a string literal in a compiled Java file.
public  StringgetAutoId(ClassDescriptor objectClass)
    
public  FilegetBaseDir()
    
public static  StringgetCanonicalName(Class clazz)
    
public static  StringgetCanonicalName(ClassDescriptor clazz)
    
public  ClassLoadergetClassLoader()
     Returns a ClassLoader which searches the user-specified class path in addition to the normal system class path.
public  CompiledObjectgetCompiledObject(String id)
    
protected  StringgetCreationCode(CompiledObject object)
    
public  StringgetEventHandlerMethodName(EventHandler handler)
    
public  SetgetImportedClasses()
    
public  SetgetImportedPackages()
    
public static  JAXXCompilergetJAXXCompiler(String className)
     Returns the compiler instance which is processing the specified JAXX class.
public  JAXXObjectDescriptorgetJAXXObjectDescriptor()
    
public  JavaFilegetJavaFile()
    
public static  StringgetLineSeparator()
     Returns the system line separator string.
public  CompiledObjectgetOpenComponent()
    
public  CompilerOptionsgetOptions()
    
public  StringgetOutputClassName()
    
public  CompiledObjectgetRootObject()
    
public static  SAXParsergetSAXParser()
    
public  FieldDescriptor[]getScriptFields()
    
public  ScriptManagergetScriptManager()
    
public  MethodDescriptor[]getScriptMethods()
    
public  StackgetSourceFiles()
    
public  StylesheetgetStylesheet()
    
public  SymbolTablegetSymbolTable()
    
public static  SymbolTablegetSymbolTable(String className)
     Returns the symbol table for the specified JAXX class.
public  StringgetUniqueId(Object object)
    
public static  StringgetVersion()
    
public static  voidinit()
    
public static  voidloadLibraries()
    
public static  voidmain(String[] arg)
    
public  voidopenComponent(CompiledObject component)
    
public  voidopenComponent(CompiledObject component, String constraints)
    
public  voidopenInvisibleComponent(CompiledObject component)
    
protected  voidoutputClass(String packageName, String className, PrintWriter out)
    
public static  DocumentparseDocument(InputStream in)
    
public  String[]parseParameterList(String parameters)
    
public  StringpreprocessScript(String script)
    
public  StringprocessDataBindings(String stringValue, ClassDescriptor type)
     Examine an attribute value for data binding expressions.
public  voidregisterCompiledObject(CompiledObject object)
    
public  voidregisterDataBinding(String src, String dest, String assignment)
    
public  voidregisterEventHandler(EventHandler handler)
    
public  voidregisterInitializer(Runnable r)
     Registers a Runnable which will be executed after the first compilation pass is complete.
public  voidregisterScript(String script)
    
public  voidregisterScript(String script, File sourceFile)
    
public  voidregisterStylesheet(Stylesheet stylesheet)
    
public  voidreportError(String error)
    
public  voidreportError(CompilerException ex)
    
public  voidreportError(String extraMessage, CompilerException ex)
    
public  voidreportError(Element tag, String error)
    
public  voidreportError(Element tag, String error, int lineOffset)
    
public  voidreportError(int lineNumber, String error)
    
public  voidreportWarning(String warning)
    
public  voidreportWarning(Element tag, String warning, int lineOffset)
    

Field Detail
JAXX_INTERNAL_NAMESPACE
final public static String JAXX_INTERNAL_NAMESPACE(Code)



JAXX_NAMESPACE
final public static String JAXX_NAMESPACE(Code)



STRICT_CHECKS
final public static boolean STRICT_CHECKS(Code)
True to throw exceptions when we encounter unresolvable classes, false to ignore. This is currently set to false until JAXX has full support for inner classes (including enumerations), because currently they don't always resolve (but will generally compile without error anyway).



applyDataBinding
public StringBuffer applyDataBinding(Code)
Body of the applyDataBinding method.



bodyCode
public StringBuffer bodyCode(Code)
Extra code to be added to the class body.



initDataBindings
public StringBuffer initDataBindings(Code)
Code to initialize data bindings.



initializer
public StringBuffer initializer(Code)
Extra code to be added to the instance initializer.



lateInitializer
public StringBuffer lateInitializer(Code)
Extra code to be added at the end of the instance initializer.



mainDeclared
boolean mainDeclared(Code)



processDataBinding
public StringBuffer processDataBinding(Code)
Body of the processDataBinding method.



removeDataBinding
public StringBuffer removeDataBinding(Code)
Body of the removeDataBinding method.




Constructor Detail
JAXXCompiler
protected JAXXCompiler(File baseDir, File src, String outputClassName, CompilerOptions options)(Code)
Creates a new JAXXCompiler.




Method Detail
URLtoFile
public static File URLtoFile(URL url)(Code)



URLtoFile
public static File URLtoFile(String urlString)(Code)



addDependencyClass
public void addDependencyClass(String className)(Code)



addEventHandlers
protected void addEventHandlers(JavaFile javaFile)(Code)



addImport
public void addImport(String text)(Code)



addInlineStyle
public void addInlineStyle(CompiledObject object, String propertyName, boolean dataBinding)(Code)



addPropertyChangeSupport
protected void addPropertyChangeSupport(JavaFile javaFile) throws CompilerException(Code)



addScriptField
public void addScriptField(FieldDescriptor field)(Code)



addScriptMethod
public void addScriptMethod(MethodDescriptor method)(Code)



capitalize
public static String capitalize(String s)(Code)



checkJavaCode
public String checkJavaCode(String javaCode)(Code)
Verifies that a snippet of Java code parses correctly. A warning is generated if the string has enclosing curly braces. Returns a "cooked" version of the string which has enclosing curly braces removed.
Parameters:
  javaCode - the Java code snippet to test
throws:
  CompilerException - if the code cannot be parsed



checkOverride
public void checkOverride(CompiledObject object) throws CompilerException(Code)



closeComponent
public void closeComponent(CompiledObject component)(Code)



compile
public static synchronized boolean compile(File base, String[] relativePaths, CompilerOptions options)(Code)
Compiled a set of files, expressed as paths relative to a base directory. The class names of the compiled files are derived from the relative path strings (e.g. "example/Foo.jaxx" compiles into a class named "example.Foo"). Returns true if compilation succeeds, false if it fails. Warning and error messages are sent to System.err.
Parameters:
  base - the directory against which to resolve relative paths
Parameters:
  relativePaths - a list of relative paths to .jaxx files being compiled
Parameters:
  options - the compiler options to use true if compilation succeeds, false otherwise



compile
public static synchronized boolean compile(File[] files, String[] classNames, CompilerOptions options)(Code)
Compiled a set of files, with the class names specified explicitly. The class compiled from files[i] will be named classNames[i]. Returns true if compilation succeeds, false if it fails. Warning and error messages are sent to System.err.
Parameters:
  files - the .jaxx files to compile
Parameters:
  classNames - the names of the classes being compiled
Parameters:
  options - the compiler options to use true if compilation succeeds, false otherwise



compileFirstPass
public void compileFirstPass(Element tag) throws IOException(Code)



compileSecondPass
public void compileSecondPass(Element tag) throws IOException(Code)



createCompleteSetupMethod
protected JavaMethod createCompleteSetupMethod()(Code)



createConstructor
protected JavaMethod createConstructor(String className) throws CompilerException(Code)



createDummyCompiler
public static JAXXCompiler createDummyCompiler()(Code)
Creates a dummy JAXXCompiler for use in unit testing.



createDummyCompiler
public static JAXXCompiler createDummyCompiler(ClassLoader classLoader)(Code)
Creates a dummy JAXXCompiler for use in unit testing.



createGetJAXXObjectDescriptorMethod
protected JavaMethod createGetJAXXObjectDescriptorMethod()(Code)



createGetObjectByIdMethod
protected JavaMethod createGetObjectByIdMethod()(Code)



createInitializer
protected JavaMethod createInitializer(String className) throws CompilerException(Code)



createJAXXObjectDescriptorField
protected JavaField createJAXXObjectDescriptorField()(Code)



createJavaFile
protected void createJavaFile(String packageName, String className) throws CompilerException(Code)



createProcessDataBindingMethod
protected JavaMethod createProcessDataBindingMethod()(Code)



escapeJavaString
public static String escapeJavaString(String raw)(Code)
Escapes a string using standard Java escape sequences, generally in preparation to including it in a string literal in a compiled Java file.
Parameters:
  raw - the raw string to be escape a string in which all 'dangerous' characters have been replaced by equivalent Java escape sequences



getAutoId
public String getAutoId(ClassDescriptor objectClass)(Code)



getBaseDir
public File getBaseDir()(Code)



getCanonicalName
public static String getCanonicalName(Class clazz)(Code)



getCanonicalName
public static String getCanonicalName(ClassDescriptor clazz)(Code)



getClassLoader
public ClassLoader getClassLoader()(Code)
Returns a ClassLoader which searches the user-specified class path in addition to the normal system class path. ClassLoader to use while resolving class references



getCompiledObject
public CompiledObject getCompiledObject(String id)(Code)



getCreationCode
protected String getCreationCode(CompiledObject object) throws CompilerException(Code)



getEventHandlerMethodName
public String getEventHandlerMethodName(EventHandler handler)(Code)



getImportedClasses
public Set getImportedClasses()(Code)



getImportedPackages
public Set getImportedPackages()(Code)



getJAXXCompiler
public static JAXXCompiler getJAXXCompiler(String className)(Code)
Returns the compiler instance which is processing the specified JAXX class. Each class is compiled by a different compiler instance.



getJAXXObjectDescriptor
public JAXXObjectDescriptor getJAXXObjectDescriptor()(Code)



getJavaFile
public JavaFile getJavaFile()(Code)



getLineSeparator
public static String getLineSeparator()(Code)
Returns the system line separator string. the string used to separate lines



getOpenComponent
public CompiledObject getOpenComponent()(Code)



getOptions
public CompilerOptions getOptions()(Code)



getOutputClassName
public String getOutputClassName()(Code)



getRootObject
public CompiledObject getRootObject()(Code)



getSAXParser
public static SAXParser getSAXParser()(Code)



getScriptFields
public FieldDescriptor[] getScriptFields()(Code)



getScriptManager
public ScriptManager getScriptManager()(Code)



getScriptMethods
public MethodDescriptor[] getScriptMethods()(Code)



getSourceFiles
public Stack getSourceFiles()(Code)



getStylesheet
public Stylesheet getStylesheet()(Code)



getSymbolTable
public SymbolTable getSymbolTable()(Code)



getSymbolTable
public static SymbolTable getSymbolTable(String className)(Code)
Returns the symbol table for the specified JAXX class. Must be called during the second compiler pass. Returns null if no such symbol table could be found.



getUniqueId
public String getUniqueId(Object object)(Code)



getVersion
public static String getVersion()(Code)



init
public static void init()(Code)



loadLibraries
public static void loadLibraries() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException(Code)



main
public static void main(String[] arg) throws Exception(Code)



openComponent
public void openComponent(CompiledObject component) throws CompilerException(Code)



openComponent
public void openComponent(CompiledObject component, String constraints) throws CompilerException(Code)



openInvisibleComponent
public void openInvisibleComponent(CompiledObject component)(Code)



outputClass
protected void outputClass(String packageName, String className, PrintWriter out) throws CompilerException(Code)



parseDocument
public static Document parseDocument(InputStream in) throws IOException, SAXException(Code)



parseParameterList
public String[] parseParameterList(String parameters) throws CompilerException(Code)



preprocessScript
public String preprocessScript(String script) throws CompilerException(Code)



processDataBindings
public String processDataBindings(String stringValue, ClassDescriptor type) throws CompilerException(Code)
Examine an attribute value for data binding expressions. Returns a 'cooked' expression which can be used to determine the resulting value. It is expected that this expression will be used as the source expression in a call to JAXXCompiler.registerDataBinding . If the attribute value does not invoke data binding, this method returns null
Parameters:
  stringValue - the string value of the property from the XML
Parameters:
  type - the type of the property, from the JAXXPropertyDescriptor a processed version of the expression



registerCompiledObject
public void registerCompiledObject(CompiledObject object)(Code)



registerDataBinding
public void registerDataBinding(String src, String dest, String assignment)(Code)



registerEventHandler
public void registerEventHandler(EventHandler handler)(Code)



registerInitializer
public void registerInitializer(Runnable r)(Code)
Registers a Runnable which will be executed after the first compilation pass is complete.



registerScript
public void registerScript(String script) throws CompilerException(Code)



registerScript
public void registerScript(String script, File sourceFile) throws CompilerException(Code)



registerStylesheet
public void registerStylesheet(Stylesheet stylesheet)(Code)



reportError
public void reportError(String error)(Code)



reportError
public void reportError(CompilerException ex)(Code)



reportError
public void reportError(String extraMessage, CompilerException ex)(Code)



reportError
public void reportError(Element tag, String error)(Code)



reportError
public void reportError(Element tag, String error, int lineOffset)(Code)



reportError
public void reportError(int lineNumber, String error)(Code)



reportWarning
public void reportWarning(String warning)(Code)



reportWarning
public void reportWarning(Element tag, String warning, int lineOffset)(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.