joie
Class Method

java.lang.Object
  |
  +--joie.Member
        |
        +--joie.Method
All Implemented Interfaces:
FilterObject

public class Method
extends Member

Defines a Method of a class as it is represented in the classfile.

Version:
0.9
Author:
Geoff Cohen, Olaf Görlitz

Field Summary
 
Fields inherited from class joie.Member
access_flags, acount, attr_count, attribs, cinfo, cpool, desc, desc_index, name, name_index
 
Fields inherited from interface joie.io.FilterObject
APPENDED, CLEAN, DIRTY, DIRTY_IN_PLACE, DIRTY_SAME_SIZE
 
Constructor Summary
protected Method()
          Protected to prevent from unwanted instantiation.
  Method(java.lang.String name, java.lang.String desc, Splice splice)
          Creates a new Method with the given name, descriptor and code splice.
 
Method Summary
 Code getCode()
           
 void prefix(Method meth)
           
 void prefix(Splice splice)
           
protected static Method readMethod(ByteStream in)
          Reads in a new Method from the ByteStream
 void setClassInfo(ClassInfo cinfo)
          Sets the new ClassInfo reference.
 void setCode(Code code)
           
 void suffix(Method meth)
           
 
Methods inherited from class joie.Member
addAttribute, assignClassInfo, getAttributes, getClassName, getDescIndex, getDescriptor, getModifiers, getName, getNameIndex, getStatus, init, readFromByteStream, rebind, resolve, serialize, serializeAppend, serializeInPlace, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Method

protected Method()
Protected to prevent from unwanted instantiation.


Method

public Method(java.lang.String name,
              java.lang.String desc,
              Splice splice)
Creates a new Method with the given name, descriptor and code splice.

Parameters:
name - the method name
desc - the method descriptor
splice - the code spllice
Method Detail

readMethod

protected static Method readMethod(ByteStream in)
                            throws java.io.IOException
Reads in a new Method from the ByteStream

Parameters:
in - the input stream
Returns:
the read Method
java.io.IOException

setClassInfo

public void setClassInfo(ClassInfo cinfo)
Description copied from class: Member
Sets the new ClassInfo reference.

Overrides:
setClassInfo in class Member
Parameters:
cinfo - the ClassInfo

getCode

public Code getCode()

setCode

public void setCode(Code code)

prefix

public void prefix(Splice splice)

prefix

public void prefix(Method meth)

suffix

public void suffix(Method meth)