harpoon.Backend.Maps
Class FinalMap

java.lang.Object
  extended by harpoon.Backend.Maps.FinalMap
Direct Known Subclasses:
DefaultFinalMap

public abstract class FinalMap
extends Object

A FinalMap determines whether a class or method is final. A simple implementation (for example, DefaultFinalMap) simply looks at the final tag on the class or method. A more sophisticated implementation (for example, CHFinalMap) takes a particular ClassHierarchy as an argument and returns true if the given class or method is never subclassed/overridden in context, even if it does not have a final access modifier tag.

Version:
$Id: FinalMap.java,v 1.2 2002/02/25 21:01:58 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
FinalMap()
           
 
Method Summary
abstract  boolean isFinal(HClass hc)
          Returns true if the class is never subclassed.
abstract  boolean isFinal(HField hf)
          Returns true if the field is never modified after declaration.
abstract  boolean isFinal(HMethod hm)
          Returns true if the method is never overridden.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinalMap

public FinalMap()
Method Detail

isFinal

public abstract boolean isFinal(HClass hc)
Returns true if the class is never subclassed.


isFinal

public abstract boolean isFinal(HMethod hm)
Returns true if the method is never overridden.


isFinal

public abstract boolean isFinal(HField hf)
Returns true if the field is never modified after declaration.