|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.javascript.configuration.ClassConfiguration
public final class ClassConfiguration
A container for all the JavaScript configuration information.
Nested Class Summary | |
---|---|
protected 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 Summary | |
---|---|
ClassConfiguration(String hostClassName,
String jsConstructor,
String extendedClassName,
String htmlClassName,
boolean jsObject)
Constructor. |
Method Summary | |
---|---|
void |
addConstant(String name)
Add the constant to the configuration. |
void |
addFunction(String name)
Add the function to the configuration. |
void |
addProperty(String name,
boolean readable,
boolean writable)
Add the property to the configuration. |
List<String> |
constants()
Returns the constant list. |
boolean |
equals(Object obj)
Test for value equality of the 2 objects. |
Set<String> |
functionKeys()
Returns the set of keys for the defined functions. |
String |
getExtendedClassName()
|
Method |
getFunctionMethod(String functionName)
Gets the method that implements the given function. |
Class<? extends SimpleScriptable> |
getHostClass()
Gets the class of the JavaScript host object. |
String |
getHtmlClassname()
|
Method |
getJsConstructor()
Gets the JavaScript constructor method in getHostClass() . |
protected ClassConfiguration.PropertyInfo |
getPropertyInfo(String propertyName)
Returns the PropertyInfo for the given property name. |
Method |
getPropertyReadMethod(String propertyName)
Gets the method that implements the getter for the named property. |
Method |
getPropertyWriteMethod(String propertyName)
Gets the method that implements the setter for the named property. |
int |
hashCode()
Currently, this is the hashcode for the linkedClass name. |
boolean |
isJsObject()
|
Set<String> |
propertyKeys()
Returns the set of keys for the defined properties. |
void |
setBrowser(String propertyName,
String browserName)
Sets the browser information for this named property. |
void |
setExtendedClassName(String extendedClass)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassConfiguration(String hostClassName, String jsConstructor, String extendedClassName, String htmlClassName, boolean jsObject) throws ClassNotFoundException
hostClassName
- - the fully qualified name of the class implementing this functionalityjsConstructor
- the constructor of method implementingClass
extendedClassName
- - The name of the class that this class extendshtmlClassName
- the name of the HTML class that this object supportsjsObject
- boolean flag for if this object is a JavaScript object
ClassNotFoundException
- - if the implementing class is not foundMethod Detail |
---|
public void addProperty(String name, boolean readable, boolean writable)
name
- name of the propertyreadable
- flag for if the property is readablewritable
- flag for if the property is writablepublic void addConstant(String name)
name
- - Name of the configurationpublic Set<String> propertyKeys()
public Set<String> functionKeys()
public List<String> constants()
public void addFunction(String name)
name
- - Name of the functionpublic void setBrowser(String propertyName, String browserName) throws IllegalStateException
propertyName
- - Name of the property to setbrowserName
- - Browser name to set
IllegalStateException
- - Property does not existpublic String getExtendedClassName()
public void setExtendedClassName(String extendedClass)
extendedClass
- the extendedClass to setprotected ClassConfiguration.PropertyInfo getPropertyInfo(String propertyName)
propertyName
- Name of property
public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare
true
if the value of this object is the same as the obj
argument; false
otherwise.public int hashCode()
hashCode
in class Object
public Method getPropertyReadMethod(String propertyName)
propertyName
- the name of the property
public Method getPropertyWriteMethod(String propertyName)
propertyName
- the name of the property
public Method getFunctionMethod(String functionName)
functionName
- the name of the property
public Class<? extends SimpleScriptable> getHostClass()
public Method getJsConstructor()
getHostClass()
.
getHostClass()
public String getHtmlClassname()
public boolean isJsObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |