// interface.beh -- interface method implementations. // $Id: interface.beh,v 1.5 2002/09/26 06:02:30 dougo Exp $ ClassGraph { /** An unmodifiable collection of nodes in the class graph. */ public Collection getNodes() {{ return Collections.unmodifiableCollection(getNodeSet()); }} /** The node labeled l in the class graph. */ public Object getNode(String l) throws NoSuchClassGraphNodeException {{ if (!getNodeSet().contains(l)) throw new NoSuchClassGraphNodeException(l); return l; }} /** An unmodifiable collection of edges (EdgeI objects) going out of node v. Return an empty collection if there are no outgoing edges. */ public Collection getOutgoingEdges(Object v) throws NoSuchClassGraphNodeException {{ if (v == null) throw new NoSuchClassGraphNodeException(v); return Collections.unmodifiableCollection(getOutgoingEdgeSet((String) v)); }} /** An unmodifiable collection of edges (EdgeI objects) coming into node v. Return an empty collection if there are no incoming edges. */ public Collection getIncomingEdges(Object v) throws NoSuchClassGraphNodeException {{ if (v == null) throw new NoSuchClassGraphNodeException(v); return Collections.unmodifiableCollection(getIncomingEdgeSet((String) v)); }} } { Part, Subclass, Superclass, Interface } { /** The source node of the edge. */ public Object getSource() {{ return get_def().get_classname().toString(); }} /** The target node of the edge. */ public Object getTarget() {{ return get_classname().toString(); }} } Part { /** The label of the edge, or null if it has none. */ public String getLabel() {{ return get_partname().toString(); }} /** Is the edge a construction (part) edge? */ public boolean isConstructionEdge() {{ return true; }} /** Is the edge an alternation (subclass) edge? */ public boolean isAlternationEdge() {{ return false; }} /** Is the edge an inheritance (superclass) edge? */ public boolean isInheritanceEdge() {{ return false; }} } Subclass { /** The label of the edge, or null if it has none. */ public String getLabel() {{ return null; }} /** Is the edge a construction (part) edge? */ public boolean isConstructionEdge() {{ return false; }} /** Is the edge an alternation (subclass) edge? */ public boolean isAlternationEdge() {{ return true; }} /** Is the edge an inheritance (superclass) edge? */ public boolean isInheritanceEdge() {{ return false; }} } { Superclass, Interface } { /** The label of the edge, or null if it has none. */ public String getLabel() {{ return null; }} /** Is the edge a construction (part) edge? */ public boolean isConstructionEdge() {{ return false; }} /** Is the edge an alternation (subclass) edge? */ public boolean isAlternationEdge() {{ return false; }} /** Is the edge an inheritance (superclass) edge? */ public boolean isInheritanceEdge() {{ return true; }} }