Esempio n. 1
0
  /**
   * Adds the <code>Declaration</code> to this scope
   *
   * <p>Sets the <code>Declaration's</code> enclosing block to be this scope <br>
   * the fully qualified name will be constructed also.
   *
   * @param decl the declaration to add
   */
  public void addDeclaration(Declaration decl) {

    super.addDeclaration(decl);

    // determine and assign the fqn of the declaration

    decl.setName(fqnToHere(decl.getUnqualifiedName()));
  }
Esempio n. 2
0
  public void moveContents(ScopeHolder fromSH) {

    if (fromSH == null) return;

    // update the fully qualified id of each declaration

    for (Enumeration decls = fromSH.elements(); decls.hasMoreElements(); ) {

      Declaration decl = (Declaration) decls.nextElement();

      ScopedName new_fqn = this.fqnToHere(decl.getUnqualifiedName());

      d.msg(
          Debug.COMPILE,
          "parameter fqn was " + decl.getName().getName() + ", is now " + new_fqn.getName());

      decl.setName(new_fqn);
    }

    // rest of move procedure

    super.moveContents(fromSH);
  }