net.java.html.json
Class Context
java.lang.Object
net.java.html.json.Context
public final class Context
- extends Object
Represents context where the Model and other objects
operate in. The context is usually a particular HTML page in a browser.
The context is also associated with the actual HTML rendering technology
in the HTML page - there is likely to be different context for
knockout.js and different one
for angular.
- Author:
- Jaroslav Tulach
|
Field Summary |
static Context |
EMPTY
Dummy context without binding to any real browser or technology. |
|
Method Summary |
static Context |
findDefault(Class<?> requestor)
Seeks for the default context that is associated with the requesting
class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY
public static final Context EMPTY
- Dummy context without binding to any real browser or technology.
Useful for simple unit testing of behavior of model classes.
findDefault
public static Context findDefault(Class<?> requestor)
- Seeks for the default context that is associated with the requesting
class. If no suitable context is found, a warning message is
printed and
EMPTY context is returned.
- Parameters:
requestor - the class that makes the request
- Returns:
- appropriate context for the request
Copyright © 2013 API Design. All Rights Reserved.