harpoon.Backend.Maps
Class CHFinalMap

java.lang.Object
  extended by harpoon.Backend.Maps.FinalMap
      extended by harpoon.Backend.Maps.DefaultFinalMap
          extended by harpoon.Backend.Maps.CHFinalMap
All Implemented Interfaces:
Serializable

public class CHFinalMap
extends DefaultFinalMap
implements Serializable

CHFinalMap is a slightly smarter FinalMap that, given a ClassHierarchy for context, aggressively makes methods final if the ClassHierarchy doesn't contain a reachable method which overrides it.

Version:
$Id: CHFinalMap.java,v 1.3 2004/02/08 01:57:37 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Constructor Summary
CHFinalMap(ClassHierarchy ch)
          Creates a CHFinalMap.
 
Method Summary
 boolean isFinal(HClass hc)
          Returns true if the class is never subclassed.
 boolean isFinal(HMethod hm)
          Returns true if the method is never overridden.
 
Methods inherited from class harpoon.Backend.Maps.DefaultFinalMap
isFinal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CHFinalMap

public CHFinalMap(ClassHierarchy ch)
Creates a CHFinalMap.

Method Detail

isFinal

public boolean isFinal(HClass hc)
Description copied from class: FinalMap
Returns true if the class is never subclassed.

Overrides:
isFinal in class DefaultFinalMap

isFinal

public boolean isFinal(HMethod hm)
Description copied from class: FinalMap
Returns true if the method is never overridden.

Overrides:
isFinal in class DefaultFinalMap