Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
   *
   * This Source Code Form is subject to the terms of the Mozilla Public
   * License, v. 2.0. If a copy of the MPL was not distributed with this
   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  
  package org.mozilla.javascript.xml;
  
This Interface describes what all XML objects (XML, XMLList) should have in common.
 
 public abstract class XMLObject extends IdScriptableObject
 {
     
     static final long serialVersionUID = 8455156490438576500L;
     
     public XMLObject()
     {
     }
 
     public XMLObject(Scriptable scopeScriptable prototype)
     {
         super(scopeprototype);
     }

    
Implementation of ECMAScript [[Has]].
 
     public abstract boolean has(Context cxObject id);

    
Implementation of ECMAScript [[Get]].
 
     public abstract Object get(Context cxObject id);

    
Implementation of ECMAScript [[Put]].
 
     public abstract void put(Context cxObject idObject value);

    
Implementation of ECMAScript [[Delete]].
 
     public abstract boolean delete(Context cxObject id);
 
 
     public abstract Object getFunctionProperty(Context cxString name);
 
     public abstract Object getFunctionProperty(Context cxint id);

    
Return an additional object to look for methods that runtime should consider during method search. Return null if no such object available.
 
     public abstract Scriptable getExtraMethodSource(Context cx);

    
Generic reference to implement x.@y, x..y etc.
 
     public abstract Ref memberRef(Context cxObject elem,
                                   int memberTypeFlags);

    
Generic reference to implement x::ns, x.@ns::y, x..@ns::y etc.
 
     public abstract Ref memberRef(Context cxObject namespaceObject elem,
                                   int memberTypeFlags);

    
Wrap this object into NativeWith to implement the with statement.
 
     public abstract NativeWith enterWith(Scriptable scope);

    
Wrap this object into NativeWith to implement the .() query.
 
     public abstract NativeWith enterDotQuery(Scriptable scope);

    
Custom + operator. Should return org.mozilla.javascript.Scriptable.NOT_FOUND if this object does not have custom addition operator for the given value, or the result of the addition operation.

The default implementation returns org.mozilla.javascript.Scriptable.NOT_FOUND to indicate no custom addition operation.

Parameters:
cx the Context object associated with the current thread.
thisIsLeft if true, the object should calculate this + value if false, the object should calculate value + this.
value the second argument for addition operation.
 
     public Object addValues(Context cxboolean thisIsLeftObject value)
     {
         return .;
     }

    
Gets the value returned by calling the typeof operator on this object.

    @Override
    public String getTypeOf()
    {
    	return avoidObjectDetection() ? "undefined" : "xml";
    }
New to GrepCode? Check out our FAQ X