com.jeffpalm.basic.bytecode.base
Class MethodImpl

java.lang.Object
  extended by com.jeffpalm.basic.bytecode.base.MethodImpl
All Implemented Interfaces:
ICodeGenerator, IFieldOrMethod, IMethod, IMutableFieldOrMethod, IMutableMethod, IDumpable

public final class MethodImpl
extends java.lang.Object
implements IMutableMethod


Constructor Summary
MethodImpl(IConstantPool pool, java.lang.String name, java.lang.String descriptor, int accessFlags)
           
 
Method Summary
 int accessFlags()
           
 boolean addAttribute(IAttribute attr)
           
 IAttribute attributes(int i)
           
 int attributesCount()
           
 ICode code()
           
 java.lang.String descriptor()
           
 void dump(IAppendable out)
           
 boolean equals(java.lang.Object o)
           
 void gen(ICodeStream code)
           
 java.lang.String name()
           
static MethodImpl newInstance(IConstantPool pool, java.lang.String name, java.lang.String descriptor, int accessFlags)
           
 IConstantPool pool()
           
 void setAccessFlags(int accessFlags)
           
 void setCodeAttribute(ICodeAttribute codeAttribute)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jeffpalm.basic.bytecode.IMutableFieldOrMethod
addAttribute
 
Methods inherited from interface com.jeffpalm.basic.bytecode.IFieldOrMethod
accessFlags, attributes, attributesCount, descriptor, name, setAccessFlags
 
Methods inherited from interface com.jeffpalm.basic.util.IDumpable
dump
 
Methods inherited from interface com.jeffpalm.basic.bytecode.ICodeGenerator
gen
 
Methods inherited from interface com.jeffpalm.basic.bytecode.IFieldOrMethod
accessFlags, attributes, attributesCount, descriptor, name, setAccessFlags
 
Methods inherited from interface com.jeffpalm.basic.util.IDumpable
dump
 
Methods inherited from interface com.jeffpalm.basic.bytecode.ICodeGenerator
gen
 

Constructor Detail

MethodImpl

public MethodImpl(IConstantPool pool,
                  java.lang.String name,
                  java.lang.String descriptor,
                  int accessFlags)
Method Detail

newInstance

public static MethodImpl newInstance(IConstantPool pool,
                                     java.lang.String name,
                                     java.lang.String descriptor,
                                     int accessFlags)

code

public ICode code()
Specified by:
code in interface IMethod

setCodeAttribute

public void setCodeAttribute(ICodeAttribute codeAttribute)

pool

public final IConstantPool pool()

name

public final java.lang.String name()
Specified by:
name in interface IFieldOrMethod

descriptor

public final java.lang.String descriptor()
Specified by:
descriptor in interface IFieldOrMethod

accessFlags

public final int accessFlags()
Specified by:
accessFlags in interface IFieldOrMethod

setAccessFlags

public void setAccessFlags(int accessFlags)
Specified by:
setAccessFlags in interface IFieldOrMethod

attributesCount

public final int attributesCount()
Specified by:
attributesCount in interface IFieldOrMethod

addAttribute

public boolean addAttribute(IAttribute attr)
Specified by:
addAttribute in interface IMutableFieldOrMethod

attributes

public final IAttribute attributes(int i)
Specified by:
attributes in interface IFieldOrMethod

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

dump

public final void dump(IAppendable out)
Specified by:
dump in interface IDumpable

gen

public final void gen(ICodeStream code)
               throws java.io.IOException
Specified by:
gen in interface ICodeGenerator
Throws:
java.io.IOException