JML

org.jmlspecs.jmlunit.strategies
Class CloneableObjectAbstractStrategy

java.lang.Object
  extended byorg.jmlspecs.jmlunit.strategies.CachedObjectAbstractStrategy
      extended byorg.jmlspecs.jmlunit.strategies.CloneableObjectAbstractStrategy
All Implemented Interfaces:
StrategyType
Direct Known Subclasses:
Arc_JML_TestData.Arc_JML_TestData$1, Arc_JML_TestData.Arc_JML_TestData$2, CharIterator_JML_TestData.CharIterator_JML_TestData$1, CloneableObjectAbstractExtensibleStrategyDecorator.CloneableObjectAbstractExtensibleStrategyDecorator$1, CloneableObjectAbstractStrategyTest.CloneableObjectAbstractStrategyTest$1, CloneableObjectAbstractStrategyTest.SingletonCOAS, CloneableObjectAbstractStrategyTest.SmallestCOAS, CloneableObjectArrayAbstractIterator_JML_TestData.CloneableObjectArrayAbstractIterator_JML_TestData$1, CompositeIterator_JML_TestData.CompositeIterator_JML_TestData$1, CompositeIterator_JML_TestData.CompositeIterator_JML_TestData$2, CompositeIterator_JML_TestData.CompositeIterator_JML_TestData$3, DLList_JML_TestData.DLList_JML_TestData$1, DLNode_JML_TestData.DLNode_JML_TestData$1, DoubleAbstractFilteringIteratorDecorator_JML_TestData.DoubleAbstractFilteringIteratorDecorator_JML_TestData$2, DoubleCompositeIterator_JML_TestData.DoubleCompositeIterator_JML_TestData$1, DoubleCompositeIterator_JML_TestData.DoubleCompositeIterator_JML_TestData$2, DoubleCompositeIterator_JML_TestData.DoubleCompositeIterator_JML_TestData$3, E_OneWayList_JML_TestData.E_OneWayList_JML_TestData$2, E_OneWayList_JML_TestData.E_OneWayList_JML_TestData$2, E_SLList_JML_TestData.E_SLList_JML_TestData$1, EntryImplementation_JML_TestData.EntryImplementation_JML_TestData$1, ImmutableObjectArrayIterator_JML_TestData.ImmutableObjectArrayIterator_JML_TestData$1, ImmutableObjectArrayIterator_JML_TestData.ImmutableObjectArrayIterator_JML_TestData$2, IntArrayIterator_JML_TestData.IntArrayIterator_JML_TestData$1, IntArrayIterator_JML_TestData.IntArrayIterator_JML_TestData$2, JMLObjectToObjectRelation_JML_TestData.JMLObjectToObjectRelation_JML_TestData$2, JMLTypeUnextensibleStrategy, JMLValueObjectPair_JML_TestData.JMLValueObjectPair_JML_TestData$1, JMLValueSet_JML_TestData.JMLValueSet_JML_TestData$2, JMLValueToValueMap_JML_TestData.JMLValueToValueMap_JML_TestData$4, ListIterator_JML_TestData.ListIterator_JML_TestData$1, NewObjectAbstractIterator_JML_TestData.NewObjectAbstractIterator_JML_TestData$2, NodeType_JML_TestData.NodeType_JML_TestData$2, NonNullIteratorDecorator_JML_TestData.NonNullIteratorDecorator_JML_TestData$1, NonNullIteratorDecorator_JML_TestData.NonNullIteratorDecorator_JML_TestData$3, OneWayList_JML_TestData.OneWayList_JML_TestData$1, OneWayList_JML_TestData.OneWayList_JML_TestData$1, OneWayNode_JML_TestData.OneWayNode_JML_TestData$1, Proof_JML_TestData.Proof_JML_TestData$2, QueueEntry_JML_TestData.QueueEntry_JML_TestData$2, SearchableDigraph_JML_TestData.SearchableDigraph_JML_TestData$1, SearchableDigraph_JML_TestData.SearchableDigraph_JML_TestData$3, SearchableNode_JML_TestData.SearchableNode_JML_TestData$1, SLList_JML_TestData.SLList_JML_TestData$1, SLNode_JML_TestData.SLNode_JML_TestData$1, StringOfObject_JML_TestData.StringOfObject_JML_TestData$2, StringOfObject_JML_TestData.StringOfObject_JML_TestData$3, SumArrayLoop_JML_TestData.SumArrayLoop_JML_TestData$1, TableImplementation_JML_TestData.TableImplementation_JML_TestData$1, TransposableDigraph_JML_TestData.TransposableDigraph_JML_TestData$2, TransposableNode_JML_TestData.TransposableNode_JML_TestData$1, TwoWayList_JML_TestData.TwoWayList_JML_TestData$1, TwoWayList_JML_TestData.TwoWayList_JML_TestData$1, TwoWayNode_JML_TestData.TwoWayNode_JML_TestData$1, USMoney_JML_TestData.USMoney_JML_TestData$2, USMoney_JML_TestData.USMoney_JML_TestData$3

public abstract class CloneableObjectAbstractStrategy
extends CachedObjectAbstractStrategy

A strategy for producing test data of cloneable reference types. It provides null as the only piece of data, by default. To provide more test data, override the addData() method.

Author:
Gary T. Leavens
See Also:
CachedObjectAbstractStrategy

Class Specifications

Specifications inherited from class Object
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this);

Model Field Summary
 
Model fields inherited from class java.lang.Object
_getClass, objectState, theString
 
Ghost Field Summary
 
Ghost fields inherited from class java.lang.Object
objectTimesFinalized, owner
 
Field Summary
 
Fields inherited from class org.jmlspecs.jmlunit.strategies.CachedObjectAbstractStrategy
 
Constructor Summary
CloneableObjectAbstractStrategy()
           
 
Model Method Summary
 
Model methods inherited from class java.lang.Object
hashValue
 
Method Summary
protected abstract  Object cloneElement(Object elem)
          Return a clone of the argument, which is assumed not to be null.
protected  IndefiniteIterator iteratorFor(Object[] data)
           
 
Methods inherited from class org.jmlspecs.jmlunit.strategies.CachedObjectAbstractStrategy
addData, defaultData, getData, iterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloneableObjectAbstractStrategy

public CloneableObjectAbstractStrategy()
Method Detail

iteratorFor

protected IndefiniteIterator iteratorFor(Object[] data)
Description copied from class: CachedObjectAbstractStrategy
Return an appropriate iterator for the data.

Specifications inherited from overridden method iteratorFor(Object[] data) in class CachedObjectAbstractStrategy:
protected normal_behavior
assignable objectState;
ensures \fresh(\result );

cloneElement

protected abstract Object cloneElement(Object elem)
Return a clone of the argument, which is assumed not to be null.

Specifications: pure
protected normal_behavior
requires elem != null;
assignable \nothing;
ensures \result != null;
ensures (* \result is a clone of elem *);
ensures_redundantly \result != null;

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.