Java Doc for PnutsCompiler.java in  » Scripting » Pnuts » pnuts » tools » 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 » Scripting » Pnuts » pnuts.tools 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   pnuts.tools.PnutsCompiler

PnutsCompiler
public class PnutsCompiler (Code)
A batch compiler for Pnuts. It reads Pnuts scripts and generates class files or a JAR file.
 Usage:
 pnutsc [ -d destination_directory ] [ -o jar_file ] [ -v ] [ -no_proxy ] [ -prefix name ] [ -main className ] [ -m module ] [ -impl pnutsImplClassName ] [ -encoding encoding_name ] [ -C dir ] { script_file | jar_file } ...
 


Field Summary
static  Stringfile_sep
    
static  Stringprefix
    

Constructor Summary
public  PnutsCompiler()
    

Method Summary
static  StringclassName(String name)
    
public  voidcompileToFile(Pnuts p, String name, File dir)
     Compile a parsed expression and save the compiled code to class files.
 voidcompileToFile(File file, File dir, Vector classNames, String encoding)
    
public  voidcompileToFile(File dir, String[] files, String[] dirs, String[] modules, String mainClassName, String pnutsImplClassName, String encoding)
     Compile Pnuts scripts and save the generated code into class files.
public  voidcompileToZip(Pnuts p, String name, ZipOutputStream zout)
    
 voidcompileToZip(File file, ZipOutputStream zout, Vector classNames, String encoding)
    
public  voidcompileToZip(ZipOutputStream zout, String[] files, String[] dirs, String[] modules, String mainClassName, String pnutsImplClassName, String encoding)
     Compile Pnuts scripts and save the generated code into a ZIP file.
public static  ClassFilegenerateMainClass(String mainClassName, String arg0, String[] modules, String[] classNames, String pnutsImplClassName)
    
 public class mainClassName extends Runtime {
 public Object run(Context ctx){
 ctx.usePackage(module1);
 ...
 CompilergetCompiler(String name)
    
public  voidincludeLineNumber(boolean flag)
    
public  voidincludeMainMethod(boolean flag)
    
public static  voidmain(String args)
    
public static  voidsetClassPrefix(String p)
     Set the prefix of the class name.
Parameters:
  prefix - the prefix.
static  voidsetProperty(String name, String value)
    
public  voidsetVerbose(boolean flag)
    
public  voiduseDynamicProxy(boolean flag)
    

Field Detail
file_sep
static String file_sep(Code)



prefix
static String prefix(Code)




Constructor Detail
PnutsCompiler
public PnutsCompiler()(Code)




Method Detail
className
static String className(String name)(Code)



compileToFile
public void compileToFile(Pnuts p, String name, File dir)(Code)
Compile a parsed expression and save the compiled code to class files.
Parameters:
  p - a parsed expression
Parameters:
  name - the class name of the compiled code
Parameters:
  dir - the directory in which the class files are saved



compileToFile
void compileToFile(File file, File dir, Vector classNames, String encoding) throws IOException, ParseException(Code)



compileToFile
public void compileToFile(File dir, String[] files, String[] dirs, String[] modules, String mainClassName, String pnutsImplClassName, String encoding) throws IOException, ParseException(Code)
Compile Pnuts scripts and save the generated code into class files.
Parameters:
  dir - the directory in which the generated byte code is saved
Parameters:
  files - the script files
Parameters:
  dirs - the directories in which each script file resides
Parameters:
  modules - used modules
Parameters:
  mainClassName - the main class name



compileToZip
public void compileToZip(Pnuts p, String name, ZipOutputStream zout)(Code)
Compile a parsed expression and save the compiled code to a Zip file
Parameters:
  p - a parsed expression
Parameters:
  name - the class name of the compiled code
Parameters:
  zout - a ZipOutputStream to which the compiled code is written



compileToZip
void compileToZip(File file, ZipOutputStream zout, Vector classNames, String encoding) throws IOException, ParseException(Code)



compileToZip
public void compileToZip(ZipOutputStream zout, String[] files, String[] dirs, String[] modules, String mainClassName, String pnutsImplClassName, String encoding) throws IOException, ParseException(Code)
Compile Pnuts scripts and save the generated code into a ZIP file.
Parameters:
  zout - the ZipOutputStream to which the generated byte code iswritten
Parameters:
  files - the script files
Parameters:
  dirs - the directories in which each script file resides
Parameters:
  modules - used modules
Parameters:
  mainClassName - the main class name



generateMainClass
public static ClassFile generateMainClass(String mainClassName, String arg0, String[] modules, String[] classNames, String pnutsImplClassName)(Code)
 public class mainClassName extends Runtime {
 public Object run(Context ctx){
 ctx.usePackage(module1);
 ...
 new className1().run((Context)ctx.clone());
 ...
 }
 public static void main(String args[]) {
 Context context = new Context();
 context.getCurrentPackage().set("$args".intern(), args);
 new mainClassName().run(context);
 }
 }
 



getCompiler
Compiler getCompiler(String name)(Code)



includeLineNumber
public void includeLineNumber(boolean flag)(Code)



includeMainMethod
public void includeMainMethod(boolean flag)(Code)

Parameters:
  flag - If true, main() method is generated.



main
public static void main(String args) throws Throwable(Code)



setClassPrefix
public static void setClassPrefix(String p)(Code)
Set the prefix of the class name.
Parameters:
  prefix - the prefix. Default is null.



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



setVerbose
public void setVerbose(boolean flag)(Code)
Set verbose mode
Parameters:
  flag - If true, verbose message is printed



useDynamicProxy
public void useDynamicProxy(boolean flag)(Code)
Switch dynamic proxy generation
Parameters:
  flag - If true dynamic proxy is generated for everymethod/constructor call.



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.