public final class ClassConfiguration extends Object
| Modifier and Type | Class and Description |
|---|---|
protected 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(String hostClassName,
String jsConstructor,
String extendedClassName,
String htmlClassName,
boolean jsObject)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
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 implementingClassextendedClassName - - 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 objectClassNotFoundException - - if the implementing class is not foundpublic 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 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 setIllegalStateException - - Property does not existpublic String getExtendedClassName()
public void setExtendedClassName(String extendedClass)
extendedClass - the extendedClass to setprotected ClassConfiguration.PropertyInfo getPropertyInfo(String propertyName)
propertyName - Name of propertypublic boolean equals(Object obj)
public int hashCode()
public Method getPropertyReadMethod(String propertyName)
propertyName - the name of the propertypublic Method getPropertyWriteMethod(String propertyName)
propertyName - the name of the propertypublic Method getFunctionMethod(String functionName)
functionName - the name of the propertypublic Class<? extends SimpleScriptable> getHostClass()
public Method getJsConstructor()
getHostClass().getHostClass()public String getHtmlClassname()
public boolean isJsObject()
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.