com.hammingweight.hammock.mocks.io
Class MockWriter

java.lang.Object
  extended by java.io.Writer
      extended by com.hammingweight.hammock.mocks.io.MockWriter
All Implemented Interfaces:
IMockObject

public class MockWriter
extends java.io.Writer
implements IMockObject


Field Summary
static MockMethod MTHD_CLOSE
           
static MockMethod MTHD_FLUSH
           
static MockMethod MTHD_WRITE_$_ARRAY_CHAR
           
static MockMethod MTHD_WRITE_$_ARRAY_CHAR_INT_INT
           
static MockMethod MTHD_WRITE_$_INT
           
static MockMethod MTHD_WRITE_$_STRING
           
static MockMethod MTHD_WRITE_$_STRING_INT_INT
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
MockWriter()
           
MockWriter(IInvocationHandler handler)
           
MockWriter(java.lang.Object arg0)
           
MockWriter(java.lang.Object arg0, IInvocationHandler handler)
           
 
Method Summary
 void close()
           
 void flush()
           
 IInvocationHandler getInvocationHandler()
          Gets the invocation handler that the mock object uses to evaluate method invocations.
 void setInvocationHandler(IInvocationHandler handler)
          Sets the invocation handler that the mock object should use to evaluate method invocations.
 void write(char[] arg0)
           
 void write(char[] arg0, int arg1, int arg2)
           
 void write(int arg0)
           
 void write(java.lang.String arg0)
           
 void write(java.lang.String arg0, int arg1, int arg2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_CLOSE

public static final MockMethod MTHD_CLOSE

MTHD_FLUSH

public static final MockMethod MTHD_FLUSH

MTHD_WRITE_$_ARRAY_CHAR

public static final MockMethod MTHD_WRITE_$_ARRAY_CHAR

MTHD_WRITE_$_ARRAY_CHAR_INT_INT

public static final MockMethod MTHD_WRITE_$_ARRAY_CHAR_INT_INT

MTHD_WRITE_$_INT

public static final MockMethod MTHD_WRITE_$_INT

MTHD_WRITE_$_STRING

public static final MockMethod MTHD_WRITE_$_STRING

MTHD_WRITE_$_STRING_INT_INT

public static final MockMethod MTHD_WRITE_$_STRING_INT_INT
Constructor Detail

MockWriter

public MockWriter(java.lang.Object arg0)

MockWriter

public MockWriter(java.lang.Object arg0,
                  IInvocationHandler handler)

MockWriter

public MockWriter()

MockWriter

public MockWriter(IInvocationHandler handler)
Method Detail

setInvocationHandler

public final void setInvocationHandler(IInvocationHandler handler)
Description copied from interface: IMockObject
Sets the invocation handler that the mock object should use to evaluate method invocations.

Specified by:
setInvocationHandler in interface IMockObject
Parameters:
handler - The invocation handler to be used by the mock object.

getInvocationHandler

public final IInvocationHandler getInvocationHandler()
Description copied from interface: IMockObject
Gets the invocation handler that the mock object uses to evaluate method invocations.

Specified by:
getInvocationHandler in interface IMockObject
Returns:
The invocation handler used by the mock object.

close

public void close()
           throws java.io.IOException
Specified by:
close in class java.io.Writer
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException

write

public void write(char[] arg0)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(char[] arg0,
                  int arg1,
                  int arg2)
           throws java.io.IOException
Specified by:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(int arg0)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(java.lang.String arg0)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

write

public void write(java.lang.String arg0,
                  int arg1,
                  int arg2)
           throws java.io.IOException
Overrides:
write in class java.io.Writer
Throws:
java.io.IOException