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 |
---|---|
protected boolean |
classConfigEquals(String classname,
ClassConfiguration config)
Test to see if the supplied configuration matches for the parsed configuration for the named class
This is a method for testing.
|
BrowserVersion |
getBrowser() |
ClassConfiguration |
getClassConfiguration(String classname)
Get the class configuration for the supplied javascript class name
|
protected Class |
getClassObject(String classname)
Return the class for the given class name
|
Method |
getFunctionMethod(Class clazz,
String functionName)
Get the method that implements the setter for the given property based upon the class object.
|
Method |
getFunctionMethod(String classname,
String functionName)
Return the method that implements the given function in the class for the given class
|
static Map |
getHtmlJavaScriptMapping()
Return an immutable map containing the html to javascript mappings.
|
static JavaScriptConfiguration |
getInstance(BrowserVersion browserVersion)
Return the instance that represents the configuration for the specified
BrowserVersion . |
Method |
getPropertyReadMethod(Class clazz,
String propertyName)
Get the method that implements the getter for the given property based upon the class object.
|
Method |
getPropertyReadMethod(String classname,
String propertyName)
Return the method that implements the get function for in the class for the given class
|
Method |
getPropertyWriteMethod(Class clazz,
String propertyName)
Get the method that implements the setter for the given property based upon the class object.
|
Method |
getPropertyWriteMethod(String classname,
String propertyName)
Return the method that implements the set function in the class for the given class
|
protected static boolean |
isDocumentLoaded()
Test for a configuration having been loaded for testing
|
protected Iterator |
keyIterator()
Get an iterator over the keys in the configuration - For testing only
|
Set |
keySet()
Get the set of keys for the class configurations.
|
protected static void |
loadConfiguration()
Get 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)
Load the configuration from a supplied Reader
|
boolean |
propertyExists(Class clazz,
String propertyName)
Check to see if there is an entry for the given property.
|
boolean |
propertyExists(String classname,
String propertyName)
Check to see if there is an entry for the given property.
|
protected static void |
resetClassForTesting()
Reset the this class to it's initial state.
|
protected static void |
setXmlDocument(Document document)
Set 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 Set keySet()
protected boolean classConfigEquals(String classname, ClassConfiguration config)
classname
- - the parsed classname to testconfig
- - the expected configurationpublic BrowserVersion getBrowser()
public ClassConfiguration getClassConfiguration(String classname)
classname
- The js class nameprotected Iterator keyIterator()
protected Class getClassObject(String classname)
classname
- The classname that you want the implementing class for. For testing only.public Method getPropertyReadMethod(Class clazz, String propertyName)
clazz
- The actual class to use as referencepropertyName
- The property to find the getter forpublic Method getPropertyReadMethod(String classname, String propertyName)
classname
- The name of the class to work withpropertyName
- The property to find the getter forpublic Method getPropertyWriteMethod(Class clazz, String propertyName)
clazz
- The actual class to use as referencepropertyName
- The property to find the getter forpublic Method getPropertyWriteMethod(String classname, String propertyName)
classname
- The name of the class to work withpropertyName
- The property to find the setter forpublic Method getFunctionMethod(Class clazz, String functionName)
clazz
- The actual class to use as referencefunctionName
- The function to find the method forpublic Method getFunctionMethod(String classname, String functionName)
classname
- The name of the class to work withfunctionName
- The function to find the method forpublic boolean propertyExists(Class clazz, String propertyName)
clazz
- The class the property is forpropertyName
- The name of the propertypublic boolean propertyExists(String classname, String propertyName)
classname
- The class the property is forpropertyName
- The name of the propertypublic static Map getHtmlJavaScriptMapping()
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.