Java Javascript Mozilla Library getJavaObject(Scriptable scope, String name)

Here you can find the source of getJavaObject(Scriptable scope, String name)

Description

get Java Object

License

Open Source License

Declaration

public static Object getJavaObject(Scriptable scope, String name) 

Method Source Code

//package com.java2s;
/*//from  w w w  .  j a  v  a 2 s. c  o m
 * Copyright by Vinicius Isola, 2010
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/mit-license.php
 */

import org.mozilla.javascript.NativeJavaObject;
import org.mozilla.javascript.Scriptable;

public class Main {
    public static Object getJavaObject(Scriptable scope, String name) {
        NativeJavaObject objWrapper = (NativeJavaObject) scope.get(name,
                null);
        return objWrapper.unwrap();
    }
}

Related

  1. getArray(Scriptable scope, NativeArray array)
  2. getClassOrObjectProto(Scriptable scope, String className)
  3. getDirectColRefExpr(Node refNode, boolean mode)
  4. getFunctionArgsString(FunctionNode fn)
  5. getGlobalContextForValidation()
  6. getJsArray(Scriptable scope, Vector v)
  7. getMapArgument(Object[] args, int pos)
  8. getObjectArgument(Object[] args, int pos, Object defaultValue)
  9. getProperty(Scriptable obj, final String prop)