Java Doc for BytecodeHelper.java in  » Scripting » groovy-1.0 » org » codehaus » groovy » classgen » 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 » groovy 1.0 » org.codehaus.groovy.classgen 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.codehaus.groovy.classgen.BytecodeHelper

BytecodeHelper
public class BytecodeHelper implements Opcodes(Code)
A helper class for bytecode generation with AsmClassGenerator.
author:
   James Strachan
author:
   Bing Ran
author:
   Jochen Theodorou
version:
   $Revision: 4287 $



Constructor Summary
public  BytecodeHelper(MethodVisitor cv)
    

Method Summary
public  voidbox(Class type)
    
public  voidbox(ClassNode type)
    
public  voidboxBoolean()
    
public static  ClassNodeboxOnPrimitive(ClassNode type)
    
public  voiddoCast(Class type)
    
public  voiddoCast(ClassNode type)
    
public  voiddoReturn(ClassNode returnType)
    
public  voiddup()
    
public static  StringformatNameForClassLoading(String name)
     returns a name that Class.forName() can take.
public static  StringgetClassInternalName(ClassNode t)
    
public static  StringgetClassInternalName(Class t)
    
public static  StringgetClassInternalName(String name)
    
public static  String[]getClassInternalNames(ClassNode[] names)
    
public static  StringgetClassLoadingTypeDescription(ClassNode c)
     array types are special: eg.: String[]: classname: [Ljava.lang.String; Object: classname: java.lang.Object int[] : classname: [I unlike getTypeDescription '.' is not replaces by '/'.
public static  StringgetMethodDescriptor(ClassNode returnType, Parameter[] parameters)
    
public static  StringgetMethodDescriptor(Class returnType, Class[] paramTypes)
    
public  MethodVisitorgetMethodVisitor()
    
public static  StringgetTypeDescription(Class c)
    
public static  StringgetTypeDescription(ClassNode c)
    
public  voidload(ClassNode type, int idx)
    
public  voidload(Variable v)
    
 voidloadConstant(Object value)
     load the constant on the operand stack.
public  voidloadVar(Variable variable)
     load the value of the variable on the operand stack.
public  voidmark(String msg)
     load a message on the stack and remove it right away.
public  voidnegateBoolean()
     negate a boolean on stack.
protected  voidpushConstant(boolean value)
    
protected  voidpushConstant(int value)
    
public  voidputField(FieldNode fld)
    
public  voidputField(FieldNode fld, String ownerName)
    
public  voidquickBoxIfNecessary(ClassNode type)
    
public  voidquickUnboxIfNecessary(ClassNode type)
    
public  voidstore(Variable v, boolean markStart)
    
public  voidstore(Variable v)
    
public  voidstoreVar(Variable variable)
    
public  voidswapObjectWith(ClassNode type)
    
public  voidswapWithObject(ClassNode type)
    
public  voidunbox(Class type)
    
public  voidunbox(ClassNode type)
    


Constructor Detail
BytecodeHelper
public BytecodeHelper(MethodVisitor cv)(Code)




Method Detail
box
public void box(Class type)(Code)
Generates the bytecode to autobox the current value on the stack



box
public void box(ClassNode type)(Code)



boxBoolean
public void boxBoolean()(Code)
convert boolean to Boolean



boxOnPrimitive
public static ClassNode boxOnPrimitive(ClassNode type)(Code)



doCast
public void doCast(Class type)(Code)



doCast
public void doCast(ClassNode type)(Code)



doReturn
public void doReturn(ClassNode returnType)(Code)



dup
public void dup()(Code)



formatNameForClassLoading
public static String formatNameForClassLoading(String name)(Code)
returns a name that Class.forName() can take. Notablely for arrays: [I, [Ljava.lang.String; etc Regular object type: java.lang.String
Parameters:
  name -



getClassInternalName
public static String getClassInternalName(ClassNode t)(Code)



getClassInternalName
public static String getClassInternalName(Class t)(Code)



getClassInternalName
public static String getClassInternalName(String name)(Code)
the ASM internal name of the type



getClassInternalNames
public static String[] getClassInternalNames(ClassNode[] names)(Code)
an array of ASM internal names of the type



getClassLoadingTypeDescription
public static String getClassLoadingTypeDescription(ClassNode c)(Code)
array types are special: eg.: String[]: classname: [Ljava.lang.String; Object: classname: java.lang.Object int[] : classname: [I unlike getTypeDescription '.' is not replaces by '/'. it seems that makes problems for the class loading if '.' is replaced by '/' the ASM type description for class loading



getMethodDescriptor
public static String getMethodDescriptor(ClassNode returnType, Parameter[] parameters)(Code)
the ASM method type descriptor



getMethodDescriptor
public static String getMethodDescriptor(Class returnType, Class[] paramTypes)(Code)
the ASM method type descriptor



getMethodVisitor
public MethodVisitor getMethodVisitor()(Code)



getTypeDescription
public static String getTypeDescription(Class c)(Code)



getTypeDescription
public static String getTypeDescription(ClassNode c)(Code)
array types are special: eg.: String[]: classname: [Ljava/lang/String; int[]: [I the ASM type description



load
public void load(ClassNode type, int idx)(Code)



load
public void load(Variable v)(Code)



loadConstant
void loadConstant(Object value)(Code)
load the constant on the operand stack. primitives auto-boxed.



loadVar
public void loadVar(Variable variable)(Code)
load the value of the variable on the operand stack. unbox it if it's a reference
Parameters:
  variable -



mark
public void mark(String msg)(Code)
load a message on the stack and remove it right away. Good for put a mark in the generated bytecode for debugging purpose.
Parameters:
  msg -



negateBoolean
public void negateBoolean()(Code)
negate a boolean on stack. true->false, false->true



pushConstant
protected void pushConstant(boolean value)(Code)



pushConstant
protected void pushConstant(int value)(Code)



putField
public void putField(FieldNode fld)(Code)



putField
public void putField(FieldNode fld, String ownerName)(Code)



quickBoxIfNecessary
public void quickBoxIfNecessary(ClassNode type)(Code)
box the primitive value on the stack
Parameters:
  type -



quickUnboxIfNecessary
public void quickUnboxIfNecessary(ClassNode type)(Code)



store
public void store(Variable v, boolean markStart)(Code)



store
public void store(Variable v)(Code)



storeVar
public void storeVar(Variable variable)(Code)



swapObjectWith
public void swapObjectWith(ClassNode type)(Code)



swapWithObject
public void swapWithObject(ClassNode type)(Code)



unbox
public void unbox(Class type)(Code)
Generates the bytecode to unbox the current value on the stack



unbox
public void unbox(ClassNode type)(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.