janino.net

org.codehaus.janino.util
Class ClassFile.MethodInfo

java.lang.Object
  extended by org.codehaus.janino.util.ClassFile.MethodInfo
Enclosing class:
ClassFile

public class ClassFile.MethodInfo
extends Object

Representation of a "method_info" structure, as defined by JVMS7 4.6.


Constructor Summary
ClassFile.MethodInfo(Java.Modifiers modifiers, short nameIndex, short descriptorIndex, List<ClassFile.AttributeInfo> attributes)
          Initializes the "method_info" structure.
 
Method Summary
 void addAttribute(ClassFile.AttributeInfo attribute)
          Adds the given attribute to this method.
 Java.Annotation[] getAnnotations()
           
 ClassFile.AttributeInfo[] getAttributes()
           
 ClassFile getClassFile()
           
 String getDescriptor()
           
 short getModifierFlags()
           
 String getName()
           
 void store(DataOutputStream dos)
          Writes this object to a DataOutputStream, in the format described inJVMS7 4.6.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFile.MethodInfo

public ClassFile.MethodInfo(Java.Modifiers modifiers,
                            short nameIndex,
                            short descriptorIndex,
                            List<ClassFile.AttributeInfo> attributes)
Initializes the "method_info" structure.

Method Detail

getClassFile

public ClassFile getClassFile()
Returns:
The ClassFile that contains this ClassFile.MethodInfo object

getModifierFlags

public short getModifierFlags()
Returns:
The modifier flags of this method; or'ed values are the constants declared in Mod.

getAnnotations

public Java.Annotation[] getAnnotations()
Returns:
The annotations of this method

getName

public String getName()
Returns:
The method's name

getDescriptor

public String getDescriptor()
Returns:
The method descriptor describing this method

getAttributes

public ClassFile.AttributeInfo[] getAttributes()
Returns:
The attributes of this method

addAttribute

public void addAttribute(ClassFile.AttributeInfo attribute)
Adds the given attribute to this method.


store

public void store(DataOutputStream dos)
           throws IOException
Writes this object to a DataOutputStream, in the format described inJVMS7 4.6.

Throws:
IOException

janino.net