Java Doc for ClassReader.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » asm » 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 » Web Framework » rife 1.6.1 » com.uwyn.rife.asm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.uwyn.rife.asm.ClassReader

ClassReader
public class ClassReader (Code)
A Java class parser to make a ClassVisitor visit an existing class. This class parses a byte array conforming to the Java class file format and calls the appropriate visit methods of a given class visitor for each field, method and bytecode instruction encountered.
author:
   Eric Bruneton
author:
   Eugene Kuleshov


Field Summary
final public  byte[]b
     The class to be parsed.
final public  intheader
     Start index of the class header information (access, name...) in ClassReader.b b .

Constructor Summary
public  ClassReader(byte[] b)
     Constructs a new ClassReader object.
public  ClassReader(byte[] b, int off, int len)
     Constructs a new ClassReader object.
public  ClassReader(InputStream is)
     Constructs a new ClassReader object.
public  ClassReader(String name)
     Constructs a new ClassReader object.

Method Summary
public  voidaccept(ClassVisitor classVisitor, boolean skipDebug)
     Makes the given visitor visit the Java class of this ClassReader . This class is the one specified in the constructor (see ClassReader.ClassReader(byte[]) ClassReader ).
Parameters:
  classVisitor - the visitor that must visit this class.
Parameters:
  skipDebug - true if the debug information of the classmust not be visited.
public  voidaccept(ClassVisitor classVisitor, Attribute[] attrs, boolean skipDebug)
     Makes the given visitor visit the Java class of this ClassReader . This class is the one specified in the constructor (see ClassReader.ClassReader(byte[]) ClassReader ).
Parameters:
  classVisitor - the visitor that must visit this class.
Parameters:
  attrs - prototypes of the attributes that must be parsed during thevisit of the class.
 voidcopyPool(ClassWriter classWriter)
     Copies the constant pool data into the given ClassWriter .
public  intgetItem(int item)
     Returns the start index of the constant pool item in ClassReader.b b , plus one.
public  intreadByte(int index)
     Reads a byte value in ClassReader.b b .
public  StringreadClass(int index, char[] buf)
     Reads a class constant pool item in ClassReader.b b .
public  ObjectreadConst(int item, char[] buf)
     Reads a numeric or string constant pool item in ClassReader.b b .
public  intreadInt(int index)
     Reads a signed int value in ClassReader.b b .
public  longreadLong(int index)
     Reads a signed long value in ClassReader.b b .
public  shortreadShort(int index)
     Reads a signed short value in ClassReader.b b .
public  StringreadUTF8(int index, char[] buf)
     Reads an UTF8 string constant pool item in ClassReader.b b .
public  intreadUnsignedShort(int index)
     Reads an unsigned short value in ClassReader.b b .

Field Detail
b
final public byte[] b(Code)
The class to be parsed. The content of this array must not be modified. This field is intended for Attribute sub classes, and is normally not needed by class generators or adapters.



header
final public int header(Code)
Start index of the class header information (access, name...) in ClassReader.b b .




Constructor Detail
ClassReader
public ClassReader(byte[] b)(Code)
Constructs a new ClassReader object.
Parameters:
  b - the bytecode of the class to be read.



ClassReader
public ClassReader(byte[] b, int off, int len)(Code)
Constructs a new ClassReader object.
Parameters:
  b - the bytecode of the class to be read.
Parameters:
  off - the start offset of the class data.
Parameters:
  len - the length of the class data.



ClassReader
public ClassReader(InputStream is) throws IOException(Code)
Constructs a new ClassReader object.
Parameters:
  is - an input stream from which to read the class.
throws:
  IOException - if a problem occurs during reading.



ClassReader
public ClassReader(String name) throws IOException(Code)
Constructs a new ClassReader object.
Parameters:
  name - the fully qualified name of the class to be read.
throws:
  IOException - if an exception occurs during reading.




Method Detail
accept
public void accept(ClassVisitor classVisitor, boolean skipDebug)(Code)
Makes the given visitor visit the Java class of this ClassReader . This class is the one specified in the constructor (see ClassReader.ClassReader(byte[]) ClassReader ).
Parameters:
  classVisitor - the visitor that must visit this class.
Parameters:
  skipDebug - true if the debug information of the classmust not be visited. In this case theMethodVisitor.visitLocalVariable visitLocalVariable andMethodVisitor.visitLineNumber visitLineNumber methods willnot be called.



accept
public void accept(ClassVisitor classVisitor, Attribute[] attrs, boolean skipDebug)(Code)
Makes the given visitor visit the Java class of this ClassReader . This class is the one specified in the constructor (see ClassReader.ClassReader(byte[]) ClassReader ).
Parameters:
  classVisitor - the visitor that must visit this class.
Parameters:
  attrs - prototypes of the attributes that must be parsed during thevisit of the class. Any attribute whose type is not equal to thetype of one the prototypes will be ignored.
Parameters:
  skipDebug - true if the debug information of the classmust not be visited. In this case theMethodVisitor.visitLocalVariable visitLocalVariable andMethodVisitor.visitLineNumber visitLineNumber methods willnot be called.



copyPool
void copyPool(ClassWriter classWriter)(Code)
Copies the constant pool data into the given ClassWriter . Should be called before the ClassReader.accept(ClassVisitor,boolean) method.
Parameters:
  classWriter - the ClassWriter to copy constant pool into.



getItem
public int getItem(int item)(Code)
Returns the start index of the constant pool item in ClassReader.b b , plus one. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  item - the index a constant pool item. the start index of the constant pool item in ClassReader.b b, plusone.



readByte
public int readByte(int index)(Code)
Reads a byte value in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  index - the start index of the value to be read in ClassReader.b b. the read value.



readClass
public String readClass(int index, char[] buf)(Code)
Reads a class constant pool item in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  index - the start index of an unsigned short value in ClassReader.b b,whose value is the index of a class constant pool item.
Parameters:
  buf - buffer to be used to read the item. This buffer must besufficiently large. It is not automatically resized. the String corresponding to the specified class item.



readConst
public Object readConst(int item, char[] buf)(Code)
Reads a numeric or string constant pool item in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  item - the index of a constant pool item.
Parameters:
  buf - buffer to be used to read the item. This buffer must besufficiently large. It is not automatically resized. the Integer, Float, Long,Double, String or Type corresponding tothe given constant pool item.



readInt
public int readInt(int index)(Code)
Reads a signed int value in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  index - the start index of the value to be read in ClassReader.b b. the read value.



readLong
public long readLong(int index)(Code)
Reads a signed long value in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  index - the start index of the value to be read in ClassReader.b b. the read value.



readShort
public short readShort(int index)(Code)
Reads a signed short value in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  index - the start index of the value to be read in ClassReader.b b. the read value.



readUTF8
public String readUTF8(int index, char[] buf)(Code)
Reads an UTF8 string constant pool item in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  index - the start index of an unsigned short value in ClassReader.b b,whose value is the index of an UTF8 constant pool item.
Parameters:
  buf - buffer to be used to read the item. This buffer must besufficiently large. It is not automatically resized. the String corresponding to the specified UTF8 item.



readUnsignedShort
public int readUnsignedShort(int index)(Code)
Reads an unsigned short value in ClassReader.b b . This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.
Parameters:
  index - the start index of the value to be read in ClassReader.b b. the read value.



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.