Package com.orange.wink.model

Examples of com.orange.wink.model.ScriptObject


   * @param po
   * @param parentScope
   * @return
   */
  public static ScriptObject buildScriptObject(final ParseObject po, final ScriptObject parent) throws WinkParseException {
    ScriptObject so;

    if (po instanceof Function) {
      so = new FunctionObject(po.getNode());
    } else if (po instanceof ObjectLit) {
      so = new LiteralObject(po.getNode());
View Full Code Here


  /**
   * @param name
   * @return
   */
  private ScriptObject getScriptObjectByName(final String name) {
    ScriptObject so = null;

    for (final FunctionObject f : functions) {
      if (f.getNamespace().toString().equals(name)) {
        if (f.getParentImpl() == null) {
          so = f;
View Full Code Here

   * @param name
   * @return
   * @throws WinkBuildException
   */
  public Object jsFunction_getDeclarationsList(final String name) throws WinkBuildException {
    final ScriptObject so = getScriptObjectByName(name);
    final StringBuffer sb = new StringBuffer();

    if (so != null) {
      sb.append(so.toString()).append("\n");
      final List<ScriptObject> exts = so.getExtensions();
      for (final ScriptObject ext : exts) {
        sb.append("\t->").append(ext).append("\n");
      }
    } else {
      throw new WinkBuildException("getDeclarationsList failed : duplicate not found");
View Full Code Here

   */
  public void jsFunction_deleteDuplicate(final String name) throws WinkBuildException {
    initFunctions();
    initLiterals();

    final ScriptObject so = getScriptObjectByName(name);
    final List<ScriptObject> toRemove = Common.newArrayList(1);

    toRemove.add(so);

    final List<ScriptObject> exts = so.getExtensions();
    for (int i = 0; i < exts.size(); i++) {
      if (i < exts.size() - 1) {
        toRemove.add(exts.get(i));
      }
    }
View Full Code Here

TOP

Related Classes of com.orange.wink.model.ScriptObject

Copyright © 2018 www.massapicom. 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.