Package de.innovationgate.eclipse.editors.tmlscript.parsing.js.methods

Source Code of de.innovationgate.eclipse.editors.tmlscript.parsing.js.methods.JavaObject

/*******************************************************************************
* Copyright (c) 2009, 2010 Innovation Gate GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*     Innovation Gate GmbH - initial API and implementation
******************************************************************************/

package de.innovationgate.eclipse.editors.tmlscript.parsing.js.methods;

import java.util.List;

import de.innovationgate.eclipse.editors.tmlscript.parsing.ReflectionManager;
import de.innovationgate.eclipse.editors.tmlscript.parsing.TMLScriptMethod;
import de.innovationgate.eclipse.editors.tmlscript.parsing.TMLScriptMethodExtension1;
import de.innovationgate.eclipse.editors.tmlscript.parsing.TMLScriptMethodParameter;

public class JavaObject extends TMLScriptMethod implements TMLScriptMethodExtension1 {

    public JavaObject() {
        super("javaObject", "java.lang.Object", ReflectionManager.GLOBAL_SCOPE_CLASSNAME);
        getParameters().add(new TMLScriptMethodParameter("jsObject", "java.lang.Object"));
    }

    public String getType(List<String> paramTypes) {
        if (paramTypes != null && paramTypes.size() == 1) {
            String jsType = paramTypes.get(0);
            if (jsType != null) {
                return ReflectionManager.jsUnwrap(jsType);
            }
        }
        return null;
    }

//    public boolean skipJSWrapping() {
//        return true;
//    }

}
TOP

Related Classes of de.innovationgate.eclipse.editors.tmlscript.parsing.js.methods.JavaObject

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.