Java Doc for MethodInfo.java in  » Byte-Code » Javassist » javassist » bytecode » 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 » Byte Code » Javassist » javassist.bytecode 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javassist.bytecode.MethodInfo

MethodInfo
final public class MethodInfo (Code)
method_info structure.
See Also:   javassist.CtMethod.getMethodInfo
See Also:   javassist.CtConstructor.getMethodInfo


Field Summary
 intaccessFlags
    
 LinkedListattribute
    
 StringcachedName
    
 ConstPoolconstPool
    
 intdescriptor
    
 intname
    
final public static  StringnameClinit
     The name of class initializer (static initializer): <clinit>.
final public static  StringnameInit
     The name of constructors: <init>.

Constructor Summary
public  MethodInfo(ConstPool cp, String methodname, String desc)
     Constructs a method_info structure.
 MethodInfo(ConstPool cp, DataInputStream in)
    
public  MethodInfo(ConstPool cp, String methodname, MethodInfo src, Map classnameMap)
     Constructs a copy of method_info structure.

Method Summary
public  voidaddAttribute(AttributeInfo info)
     Appends an attribute.
 voidcompact(ConstPool cp)
     Copies all constant pool items to a given new constant pool and replaces the original items with the new ones.
public  intgetAccessFlags()
     Returns access flags.
public  AttributeInfogetAttribute(String name)
     Returns the attribute with the specified name.
public  ListgetAttributes()
     Returns all the attributes.
public  CodeAttributegetCodeAttribute()
     Returns a Code attribute.
public  ConstPoolgetConstPool()
     Returns a constant pool table used by this method.
public  StringgetDescriptor()
     Returns a method descriptor.
public  ExceptionsAttributegetExceptionsAttribute()
     Returns an Exceptions attribute.
public  intgetLineNumber(int pos)
     Returns the line number of the source line corresponding to the specified bytecode contained in this method.
Parameters:
  pos - the position of the bytecode (>= 0).
public  StringgetName()
     Returns a method name.
public  booleanisConstructor()
     Returns true if this is a constructor.
public  booleanisMethod()
     Returns true if this is not a constructor or a class initializer (static initializer).
public  booleanisStaticInitializer()
     Returns true if this is a class initializer (static initializer).
 voidprune(ConstPool cp)
    
public  voidremoveCodeAttribute()
     Removes a Code attribute.
public  voidremoveExceptionsAttribute()
     Removes an Exception attribute.
public  voidsetAccessFlags(int acc)
     Sets access flags.
public  voidsetCodeAttribute(CodeAttribute cattr)
     Adds a Code attribute.
public  voidsetDescriptor(String desc)
     Sets a method descriptor.
public  voidsetExceptionsAttribute(ExceptionsAttribute cattr)
     Adds an Exception attribute.
public  voidsetName(String newName)
     Sets a method name.
public  voidsetSuperclass(String superclass)
     Changes a super constructor called by this constructor.

This method modifies a call to super(), which should be at the head of a constructor body, so that a constructor in a different super class is called.

public  StringtoString()
     Returns a string representation of the object.
 voidwrite(DataOutputStream out)
    

Field Detail
accessFlags
int accessFlags(Code)



attribute
LinkedList attribute(Code)



cachedName
String cachedName(Code)



constPool
ConstPool constPool(Code)



descriptor
int descriptor(Code)



name
int name(Code)



nameClinit
final public static String nameClinit(Code)
The name of class initializer (static initializer): <clinit>.



nameInit
final public static String nameInit(Code)
The name of constructors: <init>.




Constructor Detail
MethodInfo
public MethodInfo(ConstPool cp, String methodname, String desc)(Code)
Constructs a method_info structure. The initial value of access_flags is zero.
Parameters:
  cp - a constant pool table
Parameters:
  methodname - method name
Parameters:
  desc - method descriptor
See Also:   Descriptor



MethodInfo
MethodInfo(ConstPool cp, DataInputStream in) throws IOException(Code)



MethodInfo
public MethodInfo(ConstPool cp, String methodname, MethodInfo src, Map classnameMap) throws BadBytecode(Code)
Constructs a copy of method_info structure. Class names appearing in the source method_info are renamed according to classnameMap.

Note: only Code and Exceptions attributes are copied from the source. The other attributes are ignored.
Parameters:
  cp - a constant pool table
Parameters:
  methodname - a method name
Parameters:
  src - a source method_info
Parameters:
  classnameMap - specifies pairs of replaced and substituted name.
See Also:   Descriptor





Method Detail
addAttribute
public void addAttribute(AttributeInfo info)(Code)
Appends an attribute. If there is already an attribute with the same name, the new one substitutes for it.
See Also:   MethodInfo.getAttributes()



compact
void compact(ConstPool cp)(Code)
Copies all constant pool items to a given new constant pool and replaces the original items with the new ones. This is used for garbage collecting the items of removed fields and methods.
Parameters:
  cp - the destination



getAccessFlags
public int getAccessFlags()(Code)
Returns access flags.
See Also:   AccessFlag



getAttribute
public AttributeInfo getAttribute(String name)(Code)
Returns the attribute with the specified name. If it is not found, this method returns null.
Parameters:
  name - attribute name an AttributeInfo object or null.
See Also:   MethodInfo.getAttributes()



getAttributes
public List getAttributes()(Code)
Returns all the attributes. The returned List object is shared with this object. If you add a new attribute to the list, the attribute is also added to the method represented by this object. If you remove an attribute from the list, it is also removed from the method. a list of AttributeInfo objects.
See Also:   AttributeInfo



getCodeAttribute
public CodeAttribute getCodeAttribute()(Code)
Returns a Code attribute. a Code attribute or null if it is not specified.



getConstPool
public ConstPool getConstPool()(Code)
Returns a constant pool table used by this method.



getDescriptor
public String getDescriptor()(Code)
Returns a method descriptor.
See Also:   Descriptor



getExceptionsAttribute
public ExceptionsAttribute getExceptionsAttribute()(Code)
Returns an Exceptions attribute. an Exceptions attribute or null if it is not specified.



getLineNumber
public int getLineNumber(int pos)(Code)
Returns the line number of the source line corresponding to the specified bytecode contained in this method.
Parameters:
  pos - the position of the bytecode (>= 0). an index into the codearray. -1 if this information is not available.



getName
public String getName()(Code)
Returns a method name.



isConstructor
public boolean isConstructor()(Code)
Returns true if this is a constructor.



isMethod
public boolean isMethod()(Code)
Returns true if this is not a constructor or a class initializer (static initializer).



isStaticInitializer
public boolean isStaticInitializer()(Code)
Returns true if this is a class initializer (static initializer).



prune
void prune(ConstPool cp)(Code)



removeCodeAttribute
public void removeCodeAttribute()(Code)
Removes a Code attribute.



removeExceptionsAttribute
public void removeExceptionsAttribute()(Code)
Removes an Exception attribute.



setAccessFlags
public void setAccessFlags(int acc)(Code)
Sets access flags.
See Also:   AccessFlag



setCodeAttribute
public void setCodeAttribute(CodeAttribute cattr)(Code)
Adds a Code attribute.

The added attribute must share the same constant pool table as this method_info structure.




setDescriptor
public void setDescriptor(String desc)(Code)
Sets a method descriptor.
See Also:   Descriptor



setExceptionsAttribute
public void setExceptionsAttribute(ExceptionsAttribute cattr)(Code)
Adds an Exception attribute.

The added attribute must share the same constant pool table as this method_info structure.




setName
public void setName(String newName)(Code)
Sets a method name.



setSuperclass
public void setSuperclass(String superclass) throws BadBytecode(Code)
Changes a super constructor called by this constructor.

This method modifies a call to super(), which should be at the head of a constructor body, so that a constructor in a different super class is called. This method does not change actural parameters. Hence the new super class must have a constructor with the same signature as the original one.

This method should be called when the super class of the class declaring this method is changed.

This method does not perform anything unless this MethodInfo represents a constructor.
Parameters:
  superclass - the new super class




toString
public String toString()(Code)
Returns a string representation of the object.



write
void write(DataOutputStream out) throws IOException(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.