Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.ucsb.ccs.jcontractor.transformation
Class MethodSet  view MethodSet download MethodSet.java

java.lang.Object
  extended byedu.ucsb.ccs.jcontractor.transformation.MethodSet

public class MethodSet
extends java.lang.Object

A simple container to hold MethodGen objects. Basically, just a specialized hashtable.

Version:
$Id: MethodSet.java,v 1.6 2002/05/22 06:29:17 parkera Exp $

Field Summary
protected  java.util.Hashtable methods
          Hashtable implementation.
 
Constructor Summary
MethodSet()
          Create an empty method set.
 
Method Summary
protected  boolean _Invariant()
           
protected  boolean getMethod_Precondition(java.lang.String name, java.lang.String signature)
           
 org.apache.bcel.generic.MethodGen getMethod(java.lang.String name, java.lang.String signature)
          Retrieve a method from the set.
protected  boolean MethodSet_Postcondition(java.lang.Void RESULT)
           
protected  boolean putMethod_Postcondition(org.apache.bcel.generic.MethodGen mg, java.lang.Void RESULT)
           
protected  boolean putMethod_Precondition(org.apache.bcel.generic.MethodGen mg)
           
 void putMethod(org.apache.bcel.generic.MethodGen mg)
          Put a method into the set.
protected  boolean removeMethod_Postcondition(java.lang.String name, java.lang.String signature, java.lang.Void RESULT)
           
protected  boolean removeMethod_Precondition(java.lang.String name, java.lang.String signature)
           
 void removeMethod(java.lang.String name, java.lang.String signature)
          Remove a method from the set.
 int size()
          Get the number of methods in the set.
protected  boolean toArray_Postcondition(org.apache.bcel.generic.MethodGen[] RESULT)
           
 org.apache.bcel.generic.MethodGen[] toArray()
          Get an array representation of the methods in the set.
 java.lang.String toString()
          Get a string representation of the method set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

methods

protected java.util.Hashtable methods
Hashtable implementation. Keys are method names concatenated with method signatures (Strings) and values are MethodGen objects.

Constructor Detail

MethodSet

public MethodSet()
Create an empty method set.

Method Detail

MethodSet_Postcondition

protected boolean MethodSet_Postcondition(java.lang.Void RESULT)

putMethod

public void putMethod(org.apache.bcel.generic.MethodGen mg)
Put a method into the set. If the method was in the set already, it is replaced.


putMethod_Precondition

protected boolean putMethod_Precondition(org.apache.bcel.generic.MethodGen mg)

putMethod_Postcondition

protected boolean putMethod_Postcondition(org.apache.bcel.generic.MethodGen mg,
                                          java.lang.Void RESULT)

getMethod

public org.apache.bcel.generic.MethodGen getMethod(java.lang.String name,
                                                   java.lang.String signature)
Retrieve a method from the set.


getMethod_Precondition

protected boolean getMethod_Precondition(java.lang.String name,
                                         java.lang.String signature)

removeMethod

public void removeMethod(java.lang.String name,
                         java.lang.String signature)
Remove a method from the set. Has no effect if the specified method is not in the set.


removeMethod_Precondition

protected boolean removeMethod_Precondition(java.lang.String name,
                                            java.lang.String signature)

removeMethod_Postcondition

protected boolean removeMethod_Postcondition(java.lang.String name,
                                             java.lang.String signature,
                                             java.lang.Void RESULT)

size

public int size()
Get the number of methods in the set.


toArray

public org.apache.bcel.generic.MethodGen[] toArray()
Get an array representation of the methods in the set.


toArray_Postcondition

protected boolean toArray_Postcondition(org.apache.bcel.generic.MethodGen[] RESULT)

toString

public java.lang.String toString()
Get a string representation of the method set. Suitable for debugging.


_Invariant

protected boolean _Invariant()