public final class ClassConfiguration extends Object
| Modifier and Type | Class and Description |
|---|---|
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 SimpleScriptable> hostClass,
Class<?>[] domClasses,
boolean jsObject)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConstant(String name)
Add the constant to the configuration.
|
void |
addFunction(Method method)
Add the function to the configuration.
|
void |
addProperty(String name,
Method getter,
Method setter)
Add the property to the configuration.
|
List<String> |
constants()
Returns the constant list.
|
Set<Map.Entry<String,Method>> |
functionEntries()
Returns the set of entries for the defined functions.
|
Set<String> |
functionKeys()
Returns the set of keys for the defined functions.
|
Class<?>[] |
getDomClasses()
Returns the DOM classes.
|
String |
getExtendedClassName() |
Class<? extends SimpleScriptable> |
getHostClass()
Gets the class of the JavaScript host object.
|
Method |
getJsConstructor()
Gets the JavaScript constructor method in
getHostClass(). |
boolean |
isJsObject() |
Set<Map.Entry<String,ClassConfiguration.PropertyInfo>> |
propertyEntries()
Returns the set of entries for the defined properties.
|
public ClassConfiguration(Class<? extends SimpleScriptable> hostClass, Class<?>[] domClasses, boolean jsObject)
hostClass - - the class implementing this functionalitydomClasses - the DOM classes that this object supportsjsObject - boolean flag for if this object is a JavaScript objectpublic void addProperty(String name, Method getter, Method setter)
name - name of the propertygetter - the getter methodsetter - the setter methodpublic void addConstant(String name)
name - - Name of the configurationpublic Set<Map.Entry<String,ClassConfiguration.PropertyInfo>> propertyEntries()
public Set<Map.Entry<String,Method>> functionEntries()
public Set<String> functionKeys()
public void addFunction(Method method)
method - the methodpublic String getExtendedClassName()
public Class<? extends SimpleScriptable> getHostClass()
public Method getJsConstructor()
getHostClass().getHostClass()public Class<?>[] getDomClasses()
public boolean isJsObject()
Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.