com.joanju.cg.api
Class Procedure

java.lang.Object
  extended by com.joanju.cg.api.EndpointAPI
      extended by com.joanju.cg.api.Procedure
All Implemented Interfaces:
java.lang.Comparable

public class Procedure
extends EndpointAPI
implements java.lang.Comparable

A procedure is a PROCEDURE or user defined FUNCTION.

This class implements compareTo, equals, and hashCode for easy storage and sorting. If stored in a TreeSet, the objects would be sorted by the internal instruction address.


Field Summary
 
Fields inherited from class com.joanju.cg.api.EndpointAPI
cuFileName, longSigId, sourceColumn, sourceFileID, sourceFileName, sourceLine
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare by addresses.
 boolean equals(java.lang.Object obj)
          Test if addresses are equal.
 java.util.ArrayList<CallSite> findMismatches()
          Find calls to this procedure where the signatures mismatch.
 java.lang.String getAddressEncoding()
          Get a unique String encoding of this record's address.
 ProcedureInstr getBytecode()
          Get the (low-level) Bytecode instruction record for this Procedure.
 java.util.ArrayList<CallSite> getCallSiteList()
          Get the list of call sites which may reference this procedure.
 java.lang.String getProcedureName()
          Get the name of the internal procedure or user defined function.
 int hashCode()
          Return the hash code of the address.
 
Methods inherited from class com.joanju.cg.api.EndpointAPI
getCuFileID, getCuFileName, getNodeNum, getSignature, getSourceColumn, getSourceFileID, getSourceFileName, getSourceLine
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compareTo

public int compareTo(java.lang.Object o)
Compare by addresses.

Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object obj)
Test if addresses are equal.

Overrides:
equals in class java.lang.Object

findMismatches

public java.util.ArrayList<CallSite> findMismatches()
                                             throws java.sql.SQLException,
                                                    java.io.IOException
Find calls to this procedure where the signatures mismatch.

Throws:
java.sql.SQLException
java.io.IOException

getCallSiteList

public java.util.ArrayList<CallSite> getCallSiteList()
                                              throws java.sql.SQLException,
                                                     java.io.IOException
Get the list of call sites which may reference this procedure. The list is not sorted in any particular order.

Throws:
java.io.IOException
java.sql.SQLException
See Also:
CallSite

getAddressEncoding

public java.lang.String getAddressEncoding()
Get a unique String encoding of this record's address.


getBytecode

public ProcedureInstr getBytecode()
Get the (low-level) Bytecode instruction record for this Procedure. The ProcedureInstr object should not be considered part of the public API.


getProcedureName

public java.lang.String getProcedureName()
Get the name of the internal procedure or user defined function. Returns empty string "" if this is the Procedure record for the main external program block.

See Also:
EndpointAPI.getCuFileName()

hashCode

public int hashCode()
Return the hash code of the address.

Overrides:
hashCode in class java.lang.Object


Copyright © 2008 Joanju Software. All Rights Reserved.