jDummySourceForge.net Logo

net.sf.jdummy.generator
Class DummyValueGeneratingStubFactory

java.lang.Object
  extended by net.sf.jdummy.generator.DummyValueGeneratingStubFactory

 class DummyValueGeneratingStubFactory
extends java.lang.Object

Manaages stubs that generate consistent dummy results for invocations. Identical invocations (same object, same arguments) will return the same result.

Author:
Field Summary
protected  java.util.HashMap resultCache
           
protected  DummyValueFactory valueFactory
           
 
Constructor Summary
DummyValueGeneratingStubFactory(DummyValueFactory valueFactory)
           
 
Method Summary
 net.sf.jdummy.generator.DummyValueGeneratingStubFactory.DummyValueGeneratingStub createStub()
           
protected  java.lang.Object handle(Invocation invocation)
           
protected  java.lang.Object makeResult(Invocation invocation)
           
protected  java.lang.String makeResultName(Invocation invocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

valueFactory

protected final DummyValueFactory valueFactory

resultCache

protected java.util.HashMap resultCache
Constructor Detail

DummyValueGeneratingStubFactory

public DummyValueGeneratingStubFactory(DummyValueFactory valueFactory)
Parameters:
valueFactory -
Method Detail

createStub

public net.sf.jdummy.generator.DummyValueGeneratingStubFactory.DummyValueGeneratingStub createStub()

handle

protected java.lang.Object handle(Invocation invocation)
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

makeResult

protected java.lang.Object makeResult(Invocation invocation)

makeResultName

protected java.lang.String makeResultName(Invocation invocation)

jDummySourceForge.net Logo

Copyright 2005-2005-2006 Mark G. Mendel. All Rights Reserved.