com.gargoylesoftware.htmlunit.javascript.configuration
Class AbstractJavaScriptConfiguration

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.javascript.configuration.AbstractJavaScriptConfiguration
Direct Known Subclasses:
JavaScriptConfiguration, MSXMLConfiguration

public abstract class AbstractJavaScriptConfiguration
extends Object

An abstract container for all the JavaScript configuration information.

Version:
$Revision: 8960 $
Author:
Mike Bowler, Chris Erskine, Ahmed Ashour, Ronald Brill, Frank Danek

Constructor Summary
protected AbstractJavaScriptConfiguration(BrowserVersion browser)
          Constructor is only called from #getInstance(BrowserVersion) which is synchronized.
 
Method Summary
 Iterable<ClassConfiguration> getAll()
          Gets all the configurations.
 ClassConfiguration getClassConfiguration(String hostClassName)
          Gets the class configuration for the supplied JavaScript class name.
protected abstract  Class<? extends SimpleScriptable>[] getClasses()
           
 Map<Class<?>,Class<? extends SimpleScriptable>> getDomJavaScriptMapping()
          Returns an immutable map containing the DOM to JavaScript mappings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJavaScriptConfiguration

protected AbstractJavaScriptConfiguration(BrowserVersion browser)
Constructor is only called from #getInstance(BrowserVersion) which is synchronized.

Parameters:
browser - the browser version to use
Method Detail

getClasses

protected abstract Class<? extends SimpleScriptable>[] getClasses()
Returns:
the classes configured by this configuration

getAll

public Iterable<ClassConfiguration> getAll()
Gets all the configurations.

Returns:
the class configurations

getClassConfiguration

public ClassConfiguration getClassConfiguration(String hostClassName)
Gets the class configuration for the supplied JavaScript class name.

Parameters:
hostClassName - the JavaScript class name
Returns:
the class configuration for the supplied JavaScript class name

getDomJavaScriptMapping

public Map<Class<?>,Class<? extends SimpleScriptable>> getDomJavaScriptMapping()
Returns an immutable map containing the DOM to JavaScript mappings. Keys are java classes for the various DOM classes (e.g. HtmlInput.class) and the values are the JavaScript class names (e.g. "HTMLAnchorElement").

Returns:
the mappings


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.