com.ibm.wala.emf.wrappers
Class EClassHierarchyWrapper

java.lang.Object
  extended by com.ibm.wala.emf.wrappers.EObjectGraphImpl
      extended by com.ibm.wala.emf.wrappers.EObjectTree
          extended by com.ibm.wala.emf.wrappers.EClassHierarchyWrapper
All Implemented Interfaces:
EObjectGraph, EdgeManager<org.eclipse.emf.ecore.EObject>, Graph<org.eclipse.emf.ecore.EObject>, NodeManager<org.eclipse.emf.ecore.EObject>, NumberedEdgeManager<org.eclipse.emf.ecore.EObject>, NumberedGraph<org.eclipse.emf.ecore.EObject>, NumberedNodeManager<org.eclipse.emf.ecore.EObject>, java.lang.Iterable<org.eclipse.emf.ecore.EObject>

public class EClassHierarchyWrapper
extends EObjectTree

This is a convenience class: it provides a view of an EClassHierarchy that should be more convenient for most client-side use. Note that an EMF class hierarchy only includes classes (single inheritance) use in conjunction with InterfaceHierarchy to look at the entire TypeHierarchy


Constructor Summary
EClassHierarchyWrapper()
           
 
Method Summary
 void addClass(EJavaClass javaKlass)
          Add a class to this hierarchy
 void addSubClass(EJavaClass parentClass, EJavaClass childClass)
          Record that a child of a parent
 org.eclipse.emf.ecore.EObject export()
           
 java.util.Collection<EJavaClass> getAllSuperclasses(EJavaClass klass)
           
 EJavaClass getSuperclass(EJavaClass klass)
           
static EClassHierarchyWrapper load(EClassHierarchy cha)
           
 
Methods inherited from class com.ibm.wala.emf.wrappers.EObjectGraphImpl
addEdge, addNode, containsNode, equals, fromEMF, getMaxNumber, getNode, getNumber, getNumberOfNodes, getPredNodeCount, getPredNodeNumbers, getPredNodes, getSuccNodeCount, getSuccNodeNumbers, getSuccNodes, hasEdge, hashCode, iterateNodes, iterator, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EClassHierarchyWrapper

public EClassHierarchyWrapper()
Method Detail

export

public org.eclipse.emf.ecore.EObject export()
Overrides:
export in class EObjectGraphImpl
Returns:
an EClassHierarchy representing the contents of this object
See Also:
EObjectGraphImpl.export()

load

public static EClassHierarchyWrapper load(EClassHierarchy cha)
Returns:
a IClassHierarchy populated according to the contents of o
Throws:
java.lang.IllegalArgumentException - if cha is null

addClass

public void addClass(EJavaClass javaKlass)
Add a class to this hierarchy

Parameters:
javaKlass -

addSubClass

public void addSubClass(EJavaClass parentClass,
                        EJavaClass childClass)
Record that a child of a parent

Parameters:
parentClass -
childClass -

getAllSuperclasses

public java.util.Collection<EJavaClass> getAllSuperclasses(EJavaClass klass)

getSuperclass

public EJavaClass getSuperclass(EJavaClass klass)
Parameters:
klass -
Returns:
the superclass, or null if none