joeq.Compiler.Analysis.IPA
Class ProgramLocation

java.lang.Object
  extended by joeq.Compiler.Analysis.IPA.ProgramLocation
All Implemented Interfaces:
jwutil.io.Textualizable
Direct Known Subclasses:
ProgramLocation.BCProgramLocation, ProgramLocation.FakeProgramLocation, ProgramLocation.PlaceholderParameterProgramLocation, ProgramLocation.QuadProgramLocation

public abstract class ProgramLocation
extends Object
implements jwutil.io.Textualizable

This class provides a general mechanism to describe a location in the code, independent of IR type. It combines a method and a location within that method. This is useful for interprocedural analysis, among other things.

Version:
$Id: ProgramLocation.java 2458 2006-05-02 22:01:25Z mcmartin $
Author:
John Whaley

Nested Class Summary
static class ProgramLocation.BCProgramLocation
           
static class ProgramLocation.FakeProgramLocation
           
static class ProgramLocation.PlaceholderParameterProgramLocation
           
static class ProgramLocation.QuadProgramLocation
           
 
Field Summary
static boolean GIVE_SIGNATURES
           
protected  jq_Method m
          The method of this location.
 
Constructor Summary
protected ProgramLocation(jq_Method m)
           
 
Method Summary
 void addEdge(String edgeName, jwutil.io.Textualizable t)
           
static ProgramLocation getAllocLocation(jq_Class klass, int lineNum)
           
static ProgramLocation getBCProgramLocation(jq_Class klass, int lineNum, Class instructionType, int k)
           
abstract  int getBytecodeIndex()
           
static ProgramLocation getConstLocation(jq_Class klass, int lineNum)
           
 jq_Class getContainingClass()
           
 String getEmacsName()
           
abstract  int getID()
           
abstract  byte getInvocationType()
           
static ProgramLocation getInvokeLocation(jq_Class klass, int lineNum)
           
 int getLineNumber()
           
static ProgramLocation getLoadLocation(jq_Class klass, int lineNum)
           
 jq_Method getMethod()
           
abstract  jq_Type[] getParamTypes()
           
static ProgramLocation getQuadProgramLocation(jq_Class klass, int lineNum, Class instructionType, int k)
           
abstract  jq_Type getResultType()
           
abstract  jq_Type getReturnType()
           
 Utf8 getSourceFile()
           
abstract  jq_Method getTargetMethod()
           
abstract  boolean isCall()
           
abstract  boolean isInterfaceCall()
           
abstract  boolean isSingleTarget()
           
static ProgramLocation read(StringTokenizer st)
           
abstract  jq_Method resolveTargetMethod()
           
 String toStringLong()
          Print a location as it would appear in an exception stacktrace.
abstract  void write(jwutil.io.Textualizer t)
           
 void writeEdges(jwutil.io.Textualizer t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GIVE_SIGNATURES

public static final boolean GIVE_SIGNATURES

m

protected final jq_Method m
The method of this location.

Constructor Detail

ProgramLocation

protected ProgramLocation(jq_Method m)
Method Detail

getContainingClass

public jq_Class getContainingClass()

getMethod

public jq_Method getMethod()

getSourceFile

public Utf8 getSourceFile()

getLineNumber

public int getLineNumber()

toStringLong

public String toStringLong()
Print a location as it would appear in an exception stacktrace.


getID

public abstract int getID()

getBytecodeIndex

public abstract int getBytecodeIndex()

getResultType

public abstract jq_Type getResultType()

write

public abstract void write(jwutil.io.Textualizer t)
                    throws IOException
Specified by:
write in interface jwutil.io.Textualizable
Throws:
IOException

writeEdges

public void writeEdges(jwutil.io.Textualizer t)
                throws IOException
Specified by:
writeEdges in interface jwutil.io.Textualizable
Throws:
IOException

addEdge

public void addEdge(String edgeName,
                    jwutil.io.Textualizable t)
Specified by:
addEdge in interface jwutil.io.Textualizable

isCall

public abstract boolean isCall()

getTargetMethod

public abstract jq_Method getTargetMethod()

resolveTargetMethod

public abstract jq_Method resolveTargetMethod()

getParamTypes

public abstract jq_Type[] getParamTypes()

getReturnType

public abstract jq_Type getReturnType()

isSingleTarget

public abstract boolean isSingleTarget()

isInterfaceCall

public abstract boolean isInterfaceCall()

getInvocationType

public abstract byte getInvocationType()

getEmacsName

public String getEmacsName()

read

public static ProgramLocation read(StringTokenizer st)

getLoadLocation

public static ProgramLocation getLoadLocation(jq_Class klass,
                                              int lineNum)

getAllocLocation

public static ProgramLocation getAllocLocation(jq_Class klass,
                                               int lineNum)

getConstLocation

public static ProgramLocation getConstLocation(jq_Class klass,
                                               int lineNum)

getInvokeLocation

public static ProgramLocation getInvokeLocation(jq_Class klass,
                                                int lineNum)

getBCProgramLocation

public static ProgramLocation getBCProgramLocation(jq_Class klass,
                                                   int lineNum,
                                                   Class instructionType,
                                                   int k)

getQuadProgramLocation

public static ProgramLocation getQuadProgramLocation(jq_Class klass,
                                                     int lineNum,
                                                     Class instructionType,
                                                     int k)


Copyright © 2001-2008 John Whaley. All Rights Reserved.