harpoon.Backend.Maps
Class CHFinalMap
java.lang.Object
harpoon.Backend.Maps.FinalMap
harpoon.Backend.Maps.DefaultFinalMap
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHFinalMap
public CHFinalMap(ClassHierarchy ch)
- Creates a
CHFinalMap
.
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