com.joanju.cg.bytecode
Class ProcedureInstr

java.lang.Object
  extended by com.joanju.cg.bytecode.Bytecode
      extended by com.joanju.cg.bytecode.Endpoint
          extended by com.joanju.cg.bytecode.ProcedureInstr

public class ProcedureInstr
extends Endpoint


Field Summary
 
Fields inherited from class com.joanju.cg.bytecode.Endpoint
longSignature
 
Fields inherited from class com.joanju.cg.bytecode.Bytecode
address, cuid, instrSet, nodeNum, xrefs
 
Constructor Summary
ProcedureInstr()
           
ProcedureInstr(int cuid, int address)
           
 
Method Summary
 void calcValueSets()
          A checkval record for this instruction would exist if any of the external calls to this procedure were added, dropped, or rebuilt.
 void dropLocalSource(int sourceAddress)
           
 java.util.ArrayList<AbstractCall> getAllCallSites()
          Fetch all call sites for this procedure.
 int getColumn()
           
 int getFileID()
           
 int getLine()
           
 java.util.HashSet<java.lang.Integer> getLocalSources()
          Local call sites for this procedure.
 int getMethodSigID()
           
 int getNameID()
           
 Opcode getOpcode()
           
 java.util.ArrayList<java.lang.Integer> getParamNameIDs()
           
 int getTargetType()
           
 java.util.HashSet<java.lang.Integer> getWhereUsed()
          Where, OTHER THAN local sources, is this procedure instruction 'used'? Instructions for SOURCE-PROCEDURE and TARGET-PROCEDURE (if either exist) are in the where-used list for this procedure, because if the set of call sites for this procedure changes, then those have to be recalculated.
 boolean isUnresolved()
           
 java.util.Collection<Endpoint> otherExternalEndsMatching()
          Get external other ends with matching signatures.
 java.util.Collection<Endpoint> otherLocalEndsMatching()
          Get local other ends with matching signatures.
 void setColumn(int column)
           
 void setFileID(int fileID)
           
 void setLine(int line)
           
 void setMethodSigID(int methodSigID)
           
 void setNameID(int nameRVal)
           
 void setParamNameIDsReferenceTo(java.util.ArrayList<java.lang.Integer> paramNameIDs)
           
 void setTargetType(int targetType)
           
protected  void setValuesFromByteStream(java.io.DataInputStream in)
           
 java.lang.String toStringFromComments(InstructionSet instrs)
          All Bytecode instruction subclasses should override this eventually.
 java.lang.String toStringFromData()
          methodSigID, nameID, localSources, paramNameIDs, whereUsed
protected  void writeValuesToByteStream(java.io.DataOutputStream out)
           
 
Methods inherited from class com.joanju.cg.bytecode.Endpoint
getLongSignature, setLongSignature
 
Methods inherited from class com.joanju.cg.bytecode.Bytecode
addSource, addWhereUsed, beforeWrite, calcValuesAgain, compareTo, equals, fetchBytesFromDB, fetchInCu, generateDataForDB, getAddress, getCuID, getNodeNum, getSources, getValues, getValuesCalcLocal, getXrefs, hashCode, initData, isDataModified, isFromDB, setAddress, setCuID, setDataBytesFromDB, setDataModified, setFromDB, setInstructionSet, setNodeNum, shouldLoadData, sourcesForXrefTarget, storeIfModified, toString, toStringFromName, toStringFromSet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcedureInstr

public ProcedureInstr()

ProcedureInstr

public ProcedureInstr(int cuid,
                      int address)
Method Detail

calcValueSets

public void calcValueSets()
                   throws java.sql.SQLException,
                          java.io.IOException
A checkval record for this instruction would exist if any of the external calls to this procedure were added, dropped, or rebuilt. If this object exists as part of a new build (not from db), then there's no need to do anything here - the pop instruction values will get built as part of the build process anyway.

Specified by:
calcValueSets in class Bytecode
Throws:
java.sql.SQLException
java.io.IOException

dropLocalSource

public void dropLocalSource(int sourceAddress)
                     throws java.sql.SQLException,
                            java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getAllCallSites

public java.util.ArrayList<AbstractCall> getAllCallSites()
                                                  throws java.sql.SQLException,
                                                         java.io.IOException
Fetch all call sites for this procedure. Includes those with mismatched method signatures, but does not include mismatches on type (PROCEDURE|FUNCTION|METHOD).

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

getColumn

public int getColumn()
              throws java.sql.SQLException,
                     java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getFileID

public int getFileID()
              throws java.sql.SQLException,
                     java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getLine

public int getLine()
            throws java.sql.SQLException,
                   java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getLocalSources

public java.util.HashSet<java.lang.Integer> getLocalSources()
                                                     throws java.sql.SQLException,
                                                            java.io.IOException
Local call sites for this procedure.

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

getMethodSigID

public int getMethodSigID()
                   throws java.sql.SQLException,
                          java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getNameID

public int getNameID()
              throws java.sql.SQLException,
                     java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getParamNameIDs

public java.util.ArrayList<java.lang.Integer> getParamNameIDs()
                                                       throws java.sql.SQLException,
                                                              java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getOpcode

public Opcode getOpcode()
Specified by:
getOpcode in class Bytecode

getTargetType

public int getTargetType()
                  throws java.sql.SQLException,
                         java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

getWhereUsed

public java.util.HashSet<java.lang.Integer> getWhereUsed()
                                                  throws java.sql.SQLException,
                                                         java.io.IOException
Where, OTHER THAN local sources, is this procedure instruction 'used'? Instructions for SOURCE-PROCEDURE and TARGET-PROCEDURE (if either exist) are in the where-used list for this procedure, because if the set of call sites for this procedure changes, then those have to be recalculated. Local sources (local call sites) are stored separately.

Overrides:
getWhereUsed in class Bytecode
Throws:
java.sql.SQLException
java.io.IOException
See Also:
getLocalSources()

isUnresolved

public boolean isUnresolved()

otherExternalEndsMatching

public java.util.Collection<Endpoint> otherExternalEndsMatching()
                                                         throws java.sql.SQLException,
                                                                java.io.IOException
Description copied from class: Endpoint
Get external other ends with matching signatures.

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

otherLocalEndsMatching

public java.util.Collection<Endpoint> otherLocalEndsMatching()
                                                      throws java.sql.SQLException,
                                                             java.io.IOException
Description copied from class: Endpoint
Get local other ends with matching signatures.

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

setColumn

public void setColumn(int column)

setFileID

public void setFileID(int fileID)

setLine

public void setLine(int line)

setMethodSigID

public void setMethodSigID(int methodSigID)

setNameID

public void setNameID(int nameRVal)

setParamNameIDsReferenceTo

public void setParamNameIDsReferenceTo(java.util.ArrayList<java.lang.Integer> paramNameIDs)

setTargetType

public void setTargetType(int targetType)

setValuesFromByteStream

protected void setValuesFromByteStream(java.io.DataInputStream in)
                                throws java.io.IOException
Specified by:
setValuesFromByteStream in class Bytecode
Throws:
java.io.IOException

toStringFromComments

public java.lang.String toStringFromComments(InstructionSet instrs)
Description copied from class: Bytecode
All Bytecode instruction subclasses should override this eventually.

Overrides:
toStringFromComments in class Bytecode
Returns:
"" if not overridden.

toStringFromData

public java.lang.String toStringFromData()
methodSigID, nameID, localSources, paramNameIDs, whereUsed

Overrides:
toStringFromData in class Bytecode
Returns:
"" if not overridden.

writeValuesToByteStream

protected void writeValuesToByteStream(java.io.DataOutputStream out)
                                throws java.io.IOException
Specified by:
writeValuesToByteStream in class Bytecode
Throws:
java.io.IOException


Copyright © 2008 Joanju Software. All Rights Reserved.