public final class ClassConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ClassConfiguration.ConstantInfo
Class used to contain the constant information name, value and flag.
|
static class |
ClassConfiguration.PropertyInfo
Class used to contain the property information if the property is readable, writable and the
methods that implement the get and set functions.
|
Constructor and Description |
---|
ClassConfiguration(Class<? extends HtmlUnitScriptable> hostClass,
Class<?>[] domClasses,
boolean jsObject,
String className,
String extendedClassName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConstant(String name,
Object value)
Add the constant to the configuration.
|
void |
addFunction(String name,
Method method)
Add the function to the configuration.
|
void |
addProperty(String name,
Method getter,
Method setter)
Add the property to the configuration.
|
void |
addStaticFunction(String name,
Method method)
Add the static function to the configuration.
|
void |
addStaticProperty(String name,
Method getter,
Method setter)
Add the static property to the configuration.
|
void |
addSymbol(org.htmlunit.corejs.javascript.Symbol symbol,
Method method)
Add the symbol to the configuration.
|
void |
addSymbolConstant(org.htmlunit.corejs.javascript.Symbol symbol,
String value)
Add the symbol to the configuration.
|
String |
getClassName()
Returns the class name.
|
List<ClassConfiguration.ConstantInfo> |
getConstants()
Returns the constant list.
|
Class<?>[] |
getDomClasses()
Returns the DOM classes.
|
String |
getExtendedClassName() |
Map<String,Method> |
getFunctionMap()
Returns the set of entries for the defined functions.
|
Class<? extends HtmlUnitScriptable> |
getHostClass()
Gets the class of the JavaScript host object.
|
String |
getHostClassSimpleName() |
Map.Entry<String,Member> |
getJsConstructor()
Gets the JavaScript constructor method in
getHostClass() . |
String |
getJsConstructorAlias() |
Map<String,ClassConfiguration.PropertyInfo> |
getPropertyMap()
Returns the Map of entries for the defined properties.
|
Map<String,Method> |
getStaticFunctionMap()
Returns the set of entries for the defined static functions.
|
Map<String,ClassConfiguration.PropertyInfo> |
getStaticPropertyMap()
Returns the set of entries for the defined static properties.
|
Map<org.htmlunit.corejs.javascript.Symbol,String> |
getSymbolConstantMap()
Returns the Map of entries for the defined symbols.
|
Map<org.htmlunit.corejs.javascript.Symbol,Method> |
getSymbolMap()
Returns the Map of entries for the defined symbols.
|
boolean |
isJsObject() |
public ClassConfiguration(Class<? extends HtmlUnitScriptable> hostClass, Class<?>[] domClasses, boolean jsObject, String className, String extendedClassName)
hostClass
- - the class implementing this functionalitydomClasses
- the DOM classes that this object supportsjsObject
- boolean flag for if this object is a JavaScript objectclassName
- the class name, can be nullextendedClassName
- the extended class namepublic void addProperty(String name, Method getter, Method setter)
name
- name of the propertygetter
- the getter methodsetter
- the setter methodpublic void addStaticProperty(String name, Method getter, Method setter)
name
- name of the static propertygetter
- the static getter methodsetter
- the static setter methodpublic void addConstant(String name, Object value)
name
- Name of the constantvalue
- Value of the constantpublic Map<String,ClassConfiguration.PropertyInfo> getPropertyMap()
public Map<org.htmlunit.corejs.javascript.Symbol,Method> getSymbolMap()
public Map<org.htmlunit.corejs.javascript.Symbol,String> getSymbolConstantMap()
public Map<String,ClassConfiguration.PropertyInfo> getStaticPropertyMap()
public Map<String,Method> getFunctionMap()
public Map<String,Method> getStaticFunctionMap()
public List<ClassConfiguration.ConstantInfo> getConstants()
public void addSymbol(org.htmlunit.corejs.javascript.Symbol symbol, Method method)
symbol
- the symbolmethod
- the methodpublic void addSymbolConstant(org.htmlunit.corejs.javascript.Symbol symbol, String value)
symbol
- the symbolvalue
- the methodpublic void addFunction(String name, Method method)
name
- the method namemethod
- the methodpublic void addStaticFunction(String name, Method method)
name
- the function namemethod
- the methodpublic String getExtendedClassName()
public Class<? extends HtmlUnitScriptable> getHostClass()
public String getHostClassSimpleName()
public Map.Entry<String,Member> getJsConstructor()
getHostClass()
.getHostClass()
public String getJsConstructorAlias()
public Class<?>[] getDomClasses()
public boolean isJsObject()
public String getClassName()
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.