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


java.lang.Object
   java.lang.Runtime
      org.pnuts.lang.SubtypeGenerator

SubtypeGenerator
public class SubtypeGenerator extends Runtime (Code)
This class provides a way to extends a Java class in Pnuts.


Field Summary
final public static  intSUPER
    
final public static  intTHIS
    

Constructor Summary
protected  SubtypeGenerator()
    

Method Summary
public static  voidconstructor(ClassFile cf, Class superClass)
    
public static  voidconstructor(ClassFile cf, Class superClass, Compiler compiler, Context cc, List assignments)
    
public static  voiddefineMethod(ClassFile cf, Class[] parameterTypes, Class returnType, Class[] exceptionTypes, int modifiers, String methodName, String sig, int mode)
    
static  voiddefineMethods(ClassFile cf, Package pkg, Class superClass, Class[] interfaces, Context context, int mode, Signature[] signatures)
    
static  voiddefineMethods(ClassFile cf, Package pkg, Class superClass, Class[] interfaces, Context context, int mode)
    
static  voidgenerateGetter(ClassFile cf, String name, Class type, String methodName)
    
public static  ClassgenerateInterface(String name, Class[] superInterfaces, String[] signatures, Context context)
    
public static  ClassgenerateInterface(String name, Class[] superInterfaces, String[] signatures, Context context, short modifiers)
    
static  voidgenerateSetter(ClassFile cf, String name, Class type, String methodName)
    
public static  ClassgenerateSubclass(Class superClass, Class[] interfaces, Package pkg, Context context, int mode)
     Generates a class that extends the superClass and implements the interfaces.
public static  ClassgenerateSubclass(String className, Class superClass, Class[] interfaces, Package pkg, Context context, int mode)
     Generates a class that extends the superClass and implements the interfaces.
public static  ClassgenerateSubclass(String className, Class superClass, Class[] interfaces, Signature[] sigs, Package pkg, Context context, int mode)
     Generates a class that extends the superClass and implements the interfaces.
public static  ClassgenerateSubclass(String className, Class superClass, Class[] interfaces, Signature[] sigs, Package pkg, Map typeMap, Context context, int mode)
    
public static  ClassFilegetClassFileForInterface(String name, Class[] superInterfaces, String[] signatures, Context context, short modifiers)
    
public static  ClassFilegetClassFileForSubclass(String className, Class superClass, Class[] interfaces, Package pkg, Context context, int mode)
     Creates a class file image of a subtype of superClass (or some interfaces) and writes to the output stream.
public static  ClassFilegetClassFileForSubclass(String className, Class superClass, Class[] interfaces, Package pkg, Map typeMap, Context context, int mode, Signature[] signatures)
     Creates a class file image of a subtype of superClass (or some interfaces) and writes to the output stream.
public static  ObjectinstantiateSubtype(Context context, Class superClass, Class[] interfaces, Package pkg, Object[] args)
     Generates a subtype of the specified class and instantiates with the given arguments.
public static  ClassLoadermergeClassLoader(Class[] types, ClassLoader loader)
    
static  intparseTypes(String sig, Context context, List types)
    
static  ListreturnTypeAndExceptions(String sig, Context context)
    

Field Detail
SUPER
final public static int SUPER(Code)



THIS
final public static int THIS(Code)




Constructor Detail
SubtypeGenerator
protected SubtypeGenerator()(Code)




Method Detail
constructor
public static void constructor(ClassFile cf, Class superClass)(Code)



constructor
public static void constructor(ClassFile cf, Class superClass, Compiler compiler, Context cc, List assignments)(Code)



defineMethod
public static void defineMethod(ClassFile cf, Class[] parameterTypes, Class returnType, Class[] exceptionTypes, int modifiers, String methodName, String sig, int mode)(Code)



defineMethods
static void defineMethods(ClassFile cf, Package pkg, Class superClass, Class[] interfaces, Context context, int mode, Signature[] signatures)(Code)



defineMethods
static void defineMethods(ClassFile cf, Package pkg, Class superClass, Class[] interfaces, Context context, int mode)(Code)



generateGetter
static void generateGetter(ClassFile cf, String name, Class type, String methodName)(Code)



generateInterface
public static Class generateInterface(String name, Class[] superInterfaces, String[] signatures, Context context)(Code)
Generates an interface
Parameters:
  name - the name of the interface
Parameters:
  superInterfaces - an array of super interface
Parameters:
  signatures - an array of method signatures
Parameters:
  context - the context in which the classes are loaded the generated interface



generateInterface
public static Class generateInterface(String name, Class[] superInterfaces, String[] signatures, Context context, short modifiers)(Code)
Generates an interface
Parameters:
  name - the name of the interface
Parameters:
  superInterfaces - an array of super interface
Parameters:
  signatures - an array of method signatures
Parameters:
  context - the context in which the classes are loaded
Parameters:
  modifiers - the modifiers of the interface the generated interface



generateSetter
static void generateSetter(ClassFile cf, String name, Class type, String methodName)(Code)



generateSubclass
public static Class generateSubclass(Class superClass, Class[] interfaces, Package pkg, Context context, int mode)(Code)
Generates a class that extends the superClass and implements the interfaces. Functions in the pkg are mapped to non-final/static public/protected methods with the same name and the same number of parameters. Note that this method may throw ClassFormatError.
Parameters:
  superClass - super class that the generated class extends
Parameters:
  interfaces - list of interfaces that the generated class implements
Parameters:
  pkg - a Package that includes functions to be mapped to methods.
Parameters:
  context - a Context in which functions are extracted from pkg
Parameters:
  mode - THIS if each function has 'this' parameter, otherwise 0. the generated class



generateSubclass
public static Class generateSubclass(String className, Class superClass, Class[] interfaces, Package pkg, Context context, int mode)(Code)
Generates a class that extends the superClass and implements the interfaces. Functions in the pkg are mapped to non-final/static public/protected methods with the same name and the same number of parameters. Note that this method may throw ClassFormatError.
Parameters:
  className - the name of the class to be generated
Parameters:
  superClass - super class that the generated class extends
Parameters:
  interfaces - list of interfaces that the generated class implements
Parameters:
  pkg - a Package that includes functions to be mapped to methods.
Parameters:
  context - a Context in which functions are extracted from pkg
Parameters:
  mode - THIS if each function has 'this' parameter, otherwise 0. the generated class



generateSubclass
public static Class generateSubclass(String className, Class superClass, Class[] interfaces, Signature[] sigs, Package pkg, Context context, int mode)(Code)
Generates a class that extends the superClass and implements the interfaces. Functions in the pkg are mapped to non-final/static public/protected methods with the same name and the same number of parameters. Note that this method may throw ClassFormatError.
Parameters:
  className - the name of the class to be generated
Parameters:
  superClass - super class that the generated class extends
Parameters:
  interfaces - list of interfaces that the generated class implements
Parameters:
  sigs - an array of optional explicit method signature.If it is null, method signatures are determined bysupertypes' method signature and number of function parameters.If it isn't null, the array of method signatureis used to determin method signatures.
Parameters:
  pkg - a Package that includes functions to be mapped to methods.
Parameters:
  context - a Context in which functions are extracted from pkg
Parameters:
  mode - THIS if each function has 'this' parameter, otherwise 0. the generated class



generateSubclass
public static Class generateSubclass(String className, Class superClass, Class[] interfaces, Signature[] sigs, Package pkg, Map typeMap, Context context, int mode)(Code)



getClassFileForInterface
public static ClassFile getClassFileForInterface(String name, Class[] superInterfaces, String[] signatures, Context context, short modifiers)(Code)



getClassFileForSubclass
public static ClassFile getClassFileForSubclass(String className, Class superClass, Class[] interfaces, Package pkg, Context context, int mode)(Code)
Creates a class file image of a subtype of superClass (or some interfaces) and writes to the output stream.
Parameters:
  superClass - super class that the generated class extends
Parameters:
  interfaces - list of interfaces that the generated class implements
Parameters:
  pkg - a Package that includes functions to be mapped to methods.
Parameters:
  context - a Context in which functions are extracted from pkg
Parameters:
  mode - THIS if each function has 'this' parameter, otherwise 0.



getClassFileForSubclass
public static ClassFile getClassFileForSubclass(String className, Class superClass, Class[] interfaces, Package pkg, Map typeMap, Context context, int mode, Signature[] signatures)(Code)
Creates a class file image of a subtype of superClass (or some interfaces) and writes to the output stream.
Parameters:
  superClass - super class that the generated class extends
Parameters:
  interfaces - list of interfaces that the generated class implements
Parameters:
  pkg - a Package that includes functions to be mapped to methods.
Parameters:
  context - a Context in which functions are extracted from pkg
Parameters:
  mode - THIS if each function has 'this' parameter, otherwise 0.
Parameters:
  signatures - signature information



instantiateSubtype
public static Object instantiateSubtype(Context context, Class superClass, Class[] interfaces, Package pkg, Object[] args)(Code)
Generates a subtype of the specified class and instantiates with the given arguments.
Parameters:
  context - the context
Parameters:
  superClass - the super class to extend
Parameters:
  interfaces - the interfaces to implement
Parameters:
  pkg - a Package that includes functions to be mapped to methods.
Parameters:
  args - the arguments to the constructor



mergeClassLoader
public static ClassLoader mergeClassLoader(Class[] types, ClassLoader loader)(Code)



parseTypes
static int parseTypes(String sig, Context context, List types)(Code)



returnTypeAndExceptions
static List returnTypeAndExceptions(String sig, Context context)(Code)



Methods inherited from java.lang.Runtime
public void addShutdownHook(Thread hook)(Code)(Java Doc)
native public int availableProcessors()(Code)(Java Doc)
public Process exec(String command) throws IOException(Code)(Java Doc)
public Process exec(String command, String[] envp) throws IOException(Code)(Java Doc)
public Process exec(String command, String[] envp, File dir) throws IOException(Code)(Java Doc)
public Process exec(String cmdarray) throws IOException(Code)(Java Doc)
public Process exec(String[] cmdarray, String[] envp) throws IOException(Code)(Java Doc)
public Process exec(String[] cmdarray, String[] envp, File dir) throws IOException(Code)(Java Doc)
public void exit(int status)(Code)(Java Doc)
native public long freeMemory()(Code)(Java Doc)
native public void gc()(Code)(Java Doc)
public InputStream getLocalizedInputStream(InputStream in)(Code)(Java Doc)
public OutputStream getLocalizedOutputStream(OutputStream out)(Code)(Java Doc)
public static Runtime getRuntime()(Code)(Java Doc)
public void halt(int status)(Code)(Java Doc)
public void load(String filename)(Code)(Java Doc)
public void loadLibrary(String libname)(Code)(Java Doc)
native public long maxMemory()(Code)(Java Doc)
public boolean removeShutdownHook(Thread hook)(Code)(Java Doc)
public void runFinalization()(Code)(Java Doc)
public static void runFinalizersOnExit(boolean value)(Code)(Java Doc)
native public long totalMemory()(Code)(Java Doc)
native public void traceInstructions(boolean on)(Code)(Java Doc)
native public void traceMethodCalls(boolean on)(Code)(Java Doc)

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.