public class NamespaceCollection extends SimpleScriptable implements net.sourceforge.htmlunit.corejs.javascript.Function
Namespace
s.Constructor and Description |
---|
NamespaceCollection()
Default constructor required by Rhino.
|
NamespaceCollection(HTMLDocument doc)
Creates a new namespace collection for the specified page.
|
Modifier and Type | Method and Description |
---|---|
Namespace |
add(String namespace,
String urn,
String url)
Creates a new namespace and adds it to the collection.
|
Object |
call(net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args) |
net.sourceforge.htmlunit.corejs.javascript.Scriptable |
construct(net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
Object[] args) |
Object |
get(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start) |
Object |
get(String name,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
Gets a named property from the object.
|
int |
getLength()
Returns the length of this namespace collection.
|
Object |
item(Object index)
Returns the namespace at the specified index.
|
clone, equivalentValues, getBrowserVersion, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
defineFunctionProperties, defineProperty, getClassName, setClassName, setParentScope
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, size
public NamespaceCollection()
public NamespaceCollection(HTMLDocument doc)
doc
- the HTML document to which this namespace collection belongspublic final Namespace add(String namespace, String urn, String url)
namespace
- the name of the namespace to addurn
- the URN of the namespace to addurl
- the URL of the namespace to add (optional)public final int getLength()
public final Object item(Object index)
index
- the index of the namespace (either the numeric index, or the name of the namespace)public Object get(int index, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
get
in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
get
in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
public Object get(String name, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
SimpleScriptable.getWithPreemption(String)
.
For fallback case just implement ScriptableWithFallbackGetter
.
get
in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
get
in class SimpleScriptable
public Object call(net.sourceforge.htmlunit.corejs.javascript.Context cx, net.sourceforge.htmlunit.corejs.javascript.Scriptable scope, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args)
call
in interface net.sourceforge.htmlunit.corejs.javascript.Callable
call
in interface net.sourceforge.htmlunit.corejs.javascript.Function
public net.sourceforge.htmlunit.corejs.javascript.Scriptable construct(net.sourceforge.htmlunit.corejs.javascript.Context cx, net.sourceforge.htmlunit.corejs.javascript.Scriptable scope, Object[] args)
construct
in interface net.sourceforge.htmlunit.corejs.javascript.Function
Copyright © 2002–2016 Gargoyle Software Inc.. All rights reserved.