public final class JavaScriptConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DISABLED
Constant indicating that this function/property is not used by the specified browser version.
|
static int |
ENABLED
Constant indicating that this function/property is used by the specified browser version.
|
static int |
NOT_FOUND
Constant indicating that this function/property is not defined in the configuration file.
|
Modifier and Type | Method and Description |
---|---|
Iterable<ClassConfiguration> |
getAll()
Gets all the configurations.
|
ClassConfiguration |
getClassConfiguration(String classname)
Gets the class configuration for the supplied JavaScript class name.
|
Map<Class<? extends HtmlElement>,Class<? extends SimpleScriptable>> |
getHtmlJavaScriptMapping()
Returns an immutable map containing the HTML to JavaScript mappings.
|
static JavaScriptConfiguration |
getInstance(BrowserVersion browserVersion)
Returns the instance that represents the configuration for the specified
BrowserVersion . |
protected static boolean |
isDocumentLoaded()
Test for a configuration having been loaded for testing.
|
protected static void |
loadConfiguration()
Gets the configuration file and make it an input reader and then pass to the method to read the file.
|
protected static void |
loadConfiguration(Reader configurationReader)
Loads the configuration from a supplied Reader.
|
protected static void |
resetClassForTesting()
Resets this class to its initial state.
|
protected static void |
setXmlDocument(Document document)
Sets the document configuration for testing.
|
public static final int ENABLED
public static final int DISABLED
public static final int NOT_FOUND
protected static boolean isDocumentLoaded()
protected static void resetClassForTesting()
protected static void setXmlDocument(Document document)
document
- - The configuration documentprotected static void loadConfiguration()
protected static void loadConfiguration(Reader configurationReader)
configurationReader
- - A reader pointing to the configurationpublic static JavaScriptConfiguration getInstance(BrowserVersion browserVersion)
BrowserVersion
.
This method is synchronized to allow multithreaded access to the JavaScript configuration.browserVersion
- the BrowserVersion
BrowserVersion
public Iterable<ClassConfiguration> getAll()
public ClassConfiguration getClassConfiguration(String classname)
classname
- the js class namepublic Map<Class<? extends HtmlElement>,Class<? extends SimpleScriptable>> getHtmlJavaScriptMapping()
Copyright © 2002-2013 Gargoyle Software Inc.. All Rights Reserved.