JML

org.jmlspecs.racwrap.runner
Class Leaf

java.lang.Object
  extended byorg.jmlspecs.racwrap.runner.CommonImpl
      extended byorg.jmlspecs.racwrap.runner.Leaf
All Implemented Interfaces:
Node

public class Leaf
extends CommonImpl
implements Node

Leaf is an implementation of Node for leaves. As leaves have no children it does not use the hastable implementation of BranchNode. Leaves also contain information about the location of various classes associated with the component the leaf represents.


Field Summary
private  Location iface
           
private  Location original
           
 Location shadow
           
private  Location statics
           
private  Location wrapper
           
 
Fields inherited from class org.jmlspecs.racwrap.runner.CommonImpl
 
Constructor Summary
Leaf()
           
 
Method Summary
 void addChild(Node n)
          Will throw an exception, leafs cannot have children.
 Node getChild(String name)
          alwya returns null.
 Enumeration getChildren()
          always returns null.
 Location getInterface()
          Location of the interface.class (X.iface.chx)
 Enumeration getKeys()
          always returns null.
 Location getOriginal()
          Location of the original class (X.class)
 Location getStatics()
          Location of the statics class (X.statics.chx)
 Location getWrapper()
          Location of the wrapper class (X.wrap.chx)
 boolean isEmpty()
          always returns true.
 boolean prune()
          removes extraneous nodes.
 void removeChild(String name)
          Does nothing.
 void setInterface(Location loc)
           
 void setOriginal(Location loc)
           
 void setStatics(Location loc)
           
 void setWrapper(Location loc)
           
 
Methods inherited from class org.jmlspecs.racwrap.runner.CommonImpl
getName, isCheckable, isCheckInvariant, isCheckPostcondition, isCheckPrecondition, isWrap, setCheckable, setCheckInvariant, setCheckPostcondition, setCheckPrecondition, setName, setWrap, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmlspecs.racwrap.runner.Node
getName, isCheckable, isCheckInvariant, isCheckPostcondition, isCheckPrecondition, isWrap, setCheckInvariant, setCheckPostcondition, setCheckPrecondition, setName, setWrap
 

Field Detail

original

private Location original

wrapper

private Location wrapper

statics

private Location statics

iface

private Location iface

shadow

public Location shadow
Constructor Detail

Leaf

public Leaf()
Method Detail

getOriginal

public Location getOriginal()
Location of the original class (X.class)


getWrapper

public Location getWrapper()
Location of the wrapper class (X.wrap.chx)


getStatics

public Location getStatics()
Location of the statics class (X.statics.chx)


getInterface

public Location getInterface()
Location of the interface.class (X.iface.chx)


setOriginal

public void setOriginal(Location loc)

setWrapper

public void setWrapper(Location loc)

setStatics

public void setStatics(Location loc)

setInterface

public void setInterface(Location loc)

addChild

public void addChild(Node n)
Will throw an exception, leafs cannot have children.

Specified by:
addChild in interface Node

getChild

public Node getChild(String name)
alwya returns null.

Specified by:
getChild in interface Node
Returns:
null if the name is not a child.

getChildren

public Enumeration getChildren()
always returns null.

Specified by:
getChildren in interface Node

getKeys

public Enumeration getKeys()
always returns null.

Specified by:
getKeys in interface Node

isEmpty

public boolean isEmpty()
always returns true.

Specified by:
isEmpty in interface Node

removeChild

public void removeChild(String name)
Does nothing.

Specified by:
removeChild in interface Node

prune

public boolean prune()
removes extraneous nodes.

Specified by:
prune in interface Node

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.