JML

org.jmlspecs.racwrap.runner
Interface Node

All Known Implementing Classes:
BranchNode, CommonImpl, Leaf

public interface Node

Node is the basis of the tree that will be built. The tree serves as the data structue used to control the enabling/disabling of the checks of components in addition, it will contain locations of classes that can be loaded by the custom classloader.


Method Summary
 void addChild(Node n)
          Add a child node to this node.
 Node getChild(String name)
          Given a name, get the child node.
 Enumeration getChildren()
          returns an Enumeration of Nodes, which are this node's children.
 Enumeration getKeys()
          returns an Enumeration of the names of the node's children.
 String getName()
          Every node has a name that corresponds to the file/directory od the class/package.
 boolean isCheckable()
          use isCheckable to determine whether this Node represents a package or class can be checked or not.
 boolean isCheckInvariant()
          When a wrapper calls a method on the wrapped object, this method is used to determine whether to check the invariants first.
 boolean isCheckPostcondition()
          When a wrapper calls a method on the wrapped object, this method is used to determine whether to check the postconditions after.
 boolean isCheckPrecondition()
          When a wrapper calls a method on the wrapped object, this method is used to determine whether to check the preconditions first.
 boolean isEmpty()
          returns true if the node has no children.
 boolean isWrap()
          When an instance of a class is loaded, isWrap() is used to determine whether to wrap the component or not.
 boolean prune()
          removes extraneous nodes.
 void removeChild(String name)
          Does nothing if name is not a child.
 void setCheckInvariant(boolean b, boolean propagate)
           
 void setCheckPostcondition(boolean b, boolean propagate)
           
 void setCheckPrecondition(boolean b, boolean propagate)
           
 void setName(String name)
           
 void setWrap(boolean b, boolean propagate)
           
 

Method Detail

getName

public String getName()
Every node has a name that corresponds to the file/directory od the class/package.


setName

public void setName(String name)

isCheckable

public boolean isCheckable()
use isCheckable to determine whether this Node represents a package or class can be checked or not.


isWrap

public boolean isWrap()
When an instance of a class is loaded, isWrap() is used to determine whether to wrap the component or not.


isCheckPrecondition

public boolean isCheckPrecondition()
When a wrapper calls a method on the wrapped object, this method is used to determine whether to check the preconditions first.


isCheckPostcondition

public boolean isCheckPostcondition()
When a wrapper calls a method on the wrapped object, this method is used to determine whether to check the postconditions after.


isCheckInvariant

public boolean isCheckInvariant()
When a wrapper calls a method on the wrapped object, this method is used to determine whether to check the invariants first.


setWrap

public void setWrap(boolean b,
                    boolean propagate)
Parameters:
propagate - if set to true will also set the children.

setCheckPrecondition

public void setCheckPrecondition(boolean b,
                                 boolean propagate)
Parameters:
propagate - if set to true will also set the children.

setCheckPostcondition

public void setCheckPostcondition(boolean b,
                                  boolean propagate)
Parameters:
propagate - if set to true will also set the children.

setCheckInvariant

public void setCheckInvariant(boolean b,
                              boolean propagate)
Parameters:
propagate - if set to true will also set the children.

addChild

public void addChild(Node n)
Add a child node to this node.


getChild

public Node getChild(String name)
Given a name, get the child node.

Returns:
null if the name is not a child.

getKeys

public Enumeration getKeys()
returns an Enumeration of the names of the node's children.


getChildren

public Enumeration getChildren()
returns an Enumeration of Nodes, which are this node's children.


isEmpty

public boolean isEmpty()
returns true if the node has no children.


removeChild

public void removeChild(String name)
Does nothing if name is not a child.


prune

public boolean prune()
removes extraneous nodes.


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.