Class FakeEditorContext<T>
- java.lang.Object
-
- com.google.gwt.editor.client.testing.FakeEditorContext<T>
-
- Type Parameters:
T
- the type of data not being edited
- All Implemented Interfaces:
EditorContext<T>
public class FakeEditorContext<T> extends java.lang.Object implements EditorContext<T>
A no-op implementation of EditorContext for testing.
-
-
Field Summary
-
Fields inherited from interface com.google.gwt.editor.client.EditorContext
ROOT_PATH
-
-
Constructor Summary
Constructors Constructor Description FakeEditorContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeEditor<T,?,?>
asCompositeEditor()
Returnsnull
.HasEditorDelegate<T>
asHasEditorDelegate()
Returnsnull
.HasEditorErrors<T>
asHasEditorErrors()
Returnsnull
.LeafValueEditor<T>
asLeafValueEditor()
Returnsnull
.ValueAwareEditor<T>
asValueAwareEditor()
Returnsnull
.boolean
canSetInModel()
Returnsfalse
.T
checkAssignment(java.lang.Object value)
Returnsvalue
via an unchecked generic cast.java.lang.String
getAbsolutePath()
ReturnsEditorContext.ROOT_PATH
.java.lang.Class<T>
getEditedType()
Returnsnull
.Editor<T>
getEditor()
Returnsnull
.EditorDelegate<T>
getEditorDelegate()
Returnsnull
.T
getFromModel()
Returnsnull
.void
setInModel(T data)
A no-op.void
traverseSyntheticCompositeEditor(EditorVisitor visitor)
No-op.
-
-
-
Method Detail
-
asCompositeEditor
public CompositeEditor<T,?,?> asCompositeEditor()
Returnsnull
.- Specified by:
asCompositeEditor
in interfaceEditorContext<T>
-
asHasEditorDelegate
public HasEditorDelegate<T> asHasEditorDelegate()
Returnsnull
.- Specified by:
asHasEditorDelegate
in interfaceEditorContext<T>
-
asHasEditorErrors
public HasEditorErrors<T> asHasEditorErrors()
Returnsnull
.- Specified by:
asHasEditorErrors
in interfaceEditorContext<T>
-
asLeafValueEditor
public LeafValueEditor<T> asLeafValueEditor()
Returnsnull
.- Specified by:
asLeafValueEditor
in interfaceEditorContext<T>
-
asValueAwareEditor
public ValueAwareEditor<T> asValueAwareEditor()
Returnsnull
.- Specified by:
asValueAwareEditor
in interfaceEditorContext<T>
-
canSetInModel
public boolean canSetInModel()
Returnsfalse
.- Specified by:
canSetInModel
in interfaceEditorContext<T>
-
checkAssignment
public T checkAssignment(java.lang.Object value)
Returnsvalue
via an unchecked generic cast.- Specified by:
checkAssignment
in interfaceEditorContext<T>
- Parameters:
value
- any value, includingnull
- Returns:
value
cast to theT
type
-
getAbsolutePath
public java.lang.String getAbsolutePath()
ReturnsEditorContext.ROOT_PATH
.- Specified by:
getAbsolutePath
in interfaceEditorContext<T>
-
getEditedType
public java.lang.Class<T> getEditedType()
Returnsnull
.- Specified by:
getEditedType
in interfaceEditorContext<T>
-
getEditor
public Editor<T> getEditor()
Returnsnull
.- Specified by:
getEditor
in interfaceEditorContext<T>
-
getEditorDelegate
public EditorDelegate<T> getEditorDelegate()
Returnsnull
.- Specified by:
getEditorDelegate
in interfaceEditorContext<T>
-
getFromModel
public T getFromModel()
Returnsnull
.- Specified by:
getFromModel
in interfaceEditorContext<T>
-
setInModel
public void setInModel(T data)
A no-op.- Specified by:
setInModel
in interfaceEditorContext<T>
-
traverseSyntheticCompositeEditor
public void traverseSyntheticCompositeEditor(EditorVisitor visitor)
No-op.- Specified by:
traverseSyntheticCompositeEditor
in interfaceEditorContext<T>
-
-