GWT 0.0.0

com.google.gwt.editor.client.testing
Class MockSimpleBeanEditorDriver<T,E extends Editor<T>>

java.lang.Object
  extended by com.google.gwt.editor.client.testing.MockSimpleBeanEditorDriver<T,E>
Type Parameters:
T - the type being edited
E - the Editor type
All Implemented Interfaces:
SimpleBeanEditorDriver<T,E>

public class MockSimpleBeanEditorDriver<T,E extends Editor<T>>
extends java.lang.Object
implements SimpleBeanEditorDriver<T,E>

A no-op implementation of SimpleBeanEditorDriver that records its inputs.


Constructor Summary
MockSimpleBeanEditorDriver()
           
 
Method Summary
 void edit(T object)
          Records object.
 T flush()
          Returns null or the last value provided to edit(T).
 E getEditor()
          Returns null or the last value provided to initialize(E) .
 java.util.List<EditorError> getErrors()
          Returns an empty list.
 T getObject()
          Returns null or the last value provided to edit(T).
 boolean hasErrors()
          Returns false.
 void initialize(E editor)
          Records editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockSimpleBeanEditorDriver

public MockSimpleBeanEditorDriver()
Method Detail

edit

public void edit(T object)
Records object.

Specified by:
edit in interface SimpleBeanEditorDriver<T,E extends Editor<T>>
Parameters:
object - the object providing input data

flush

public T flush()
Returns null or the last value provided to edit(T).

Specified by:
flush in interface SimpleBeanEditorDriver<T,E extends Editor<T>>
Returns:
the object passed into SimpleBeanEditorDriver.edit(T)

getEditor

public E getEditor()
Returns null or the last value provided to initialize(E) .


getErrors

public java.util.List<EditorError> getErrors()
Returns an empty list.

Specified by:
getErrors in interface SimpleBeanEditorDriver<T,E extends Editor<T>>
Returns:
a List of EditorError instances

getObject

public T getObject()
Returns null or the last value provided to edit(T).


hasErrors

public boolean hasErrors()
Returns false.

Specified by:
hasErrors in interface SimpleBeanEditorDriver<T,E extends Editor<T>>
Returns:
true if errors are present

initialize

public void initialize(E editor)
Records editor.

Specified by:
initialize in interface SimpleBeanEditorDriver<T,E extends Editor<T>>
Parameters:
editor - the Editor to populate

GWT 0.0.0