Java Javascript Mozilla Library isStaticProperty(Scriptable property)

Here you can find the source of isStaticProperty(Scriptable property)

Description

Replies true if the mixin property propert is a "static" property.

License

Open Source License

Parameter

Parameter Description
property the property as defined in the mixin definition

Return

true, if this is a static property

Declaration

static public boolean isStaticProperty(Scriptable property) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.mozilla.javascript.Scriptable;

public class Main {
    /**//from ww  w .j  a va 2 s .  c o  m
     * <p>Replies true if the mixin property <code>propert</code> is a "static" property.</p>
     *
     * @param property  the property as defined in the mixin definition
     * @return true, if this is a static property
     */
    static public boolean isStaticProperty(Scriptable property) {
        Object isStatic = ((Scriptable) property).get("static",
                (Scriptable) property);
        return isStatic != Scriptable.NOT_FOUND
                && isStatic instanceof Boolean && ((Boolean) isStatic);
    }
}

Related

  1. isName(AstNode node, String value)
  2. isNullNativeObject(Object val)
  3. isPrototypeNameNode(AstNode node)
  4. isPrototypePropertyGet(PropertyGet pg)
  5. isSimplePropertyGet(PropertyGet pg, String expectedObj, String expectedField)
  6. isValid(Object[] args)
  7. isVariable(Name name)
  8. javaToJS(Object o, Scriptable scope)
  9. jsToJava(Object jsObject)