com.joanju.cg.api
Class EndpointAPI

java.lang.Object
  extended by com.joanju.cg.api.EndpointAPI
Direct Known Subclasses:
CallSite, Procedure

public abstract class EndpointAPI
extends java.lang.Object

An EndpointAPI represents a CallSite or a Procedure. It is a point in the code, at one end or the other of a call, with attributes such as file, line, and method signature.


Field Summary
protected  java.lang.String cuFileName
           
protected  int longSigId
           
protected  int sourceColumn
           
protected  int sourceFileID
           
protected  java.lang.String sourceFileName
           
protected  int sourceLine
           
 
Method Summary
 int getCuFileID()
          Get the integer file ID for the compile unit, which may be different than the source.
 java.lang.String getCuFileName()
          Get the canonical path to the compile unit's source file.
 int getNodeNum()
          Get the number of the JPNode in the syntax tree which maps to this record.
 java.lang.String getSignature()
          Get Callgraph's "signature" for this call or procedure.
 int getSourceColumn()
          Get the column position in the source file where this call instruction is found.
 int getSourceFileID()
          Get a unique integer ID for the source file.
 java.lang.String getSourceFileName()
          Get the canonical path to the source file that this call instruction is found in.
 int getSourceLine()
          Get the line number in the source file where this call instruction is found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

longSigId

protected int longSigId

sourceColumn

protected int sourceColumn

sourceFileID

protected int sourceFileID

sourceLine

protected int sourceLine

cuFileName

protected java.lang.String cuFileName

sourceFileName

protected java.lang.String sourceFileName
Method Detail

getSignature

public java.lang.String getSignature()
                              throws java.sql.SQLException
Get Callgraph's "signature" for this call or procedure.

Throws:
java.sql.SQLException - if there's an error fetching the signature string from the database.

getCuFileID

public int getCuFileID()
Get the integer file ID for the compile unit, which may be different than the source.


getCuFileName

public java.lang.String getCuFileName()
Get the canonical path to the compile unit's source file.


getNodeNum

public int getNodeNum()
Get the number of the JPNode in the syntax tree which maps to this record. Useful when we want to relate a Callgraph record back to the node in the syntax tree it was derived from.

See Also:
JPNode.getNodeNum()

getSourceColumn

public int getSourceColumn()
Get the column position in the source file where this call instruction is found.


getSourceFileID

public int getSourceFileID()
Get a unique integer ID for the source file. This ID is persistent as long as the database is not cleared. Same result as, but more efficient than, using CgAPI.lookupStringID(getSourceFileName()).

See Also:
CgAPI.lookupStringID(String)

getSourceFileName

public java.lang.String getSourceFileName()
Get the canonical path to the source file that this call instruction is found in.


getSourceLine

public int getSourceLine()
Get the line number in the source file where this call instruction is found.



Copyright © 2008 Joanju Software. All Rights Reserved.