Examples of IdentityHashMap


Examples of java.util.IdentityHashMap

                           getCodebaseMap())
        );

        // set up new indirection maps for this encapsulation

        valueMap = new IdentityHashMap();
        repIdMap = new HashMap();
        codebaseMap = new HashMap();

        // the start of this encapsulation
View Full Code Here

Examples of java.util.IdentityHashMap

  /**
   * Create an IdentitySet with default sizing.
   */
  public IdentitySet() {
    this.map = new IdentityHashMap();
  }
View Full Code Here

Examples of java.util.IdentityHashMap

   * Create an IdentitySet with the given sizing.
   *
   * @param sizing The sizing of the set to create.
   */
  public IdentitySet(int sizing) {
    this.map = new IdentityHashMap( sizing );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

   *
   * @param event The create event to be handled.
   * @throws HibernateException
   */
  public void onPersist(PersistEvent event) throws HibernateException {
    onPersist( event, new IdentityHashMap(10) );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

    private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class,
                                                                       DefaultRefreshEventListener.class.getName());

  public void onRefresh(RefreshEvent event) throws HibernateException {
    onRefresh( event, new IdentityHashMap(10) );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

         * 1. SCXML elemnt (top) should reach count exactly 1. We essentially
         * summarize up the hierarchy tree starting with a given set of
         * states = active configuration.
         */
        boolean legalConfig = true; // let's be optimists
        Map counts = new IdentityHashMap();
        Set scxmlCount = new HashSet();
        for (Iterator i = states.iterator(); i.hasNext();) {
            TransitionTarget tt = (TransitionTarget) i.next();
            TransitionTarget parent = null;
            while ((parent = tt.getParent()) != null) {
                HashSet cnt = (HashSet) counts.get(parent);
                if (cnt == null) {
                    cnt = new HashSet();
                    counts.put(parent, cnt);
                }
                cnt.add(tt);
                tt = parent;
            }
            //top-level contribution
            scxmlCount.add(tt);
        }
        //Validate counts:
        for (Iterator i = counts.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            TransitionTarget tt = (TransitionTarget) entry.getKey();
            Set count = (Set) entry.getValue();
            if (tt instanceof Parallel) {
                Parallel p = (Parallel) tt;
                if (count.size() < p.getChildren().size()) {
                    errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
                        "Not all AND states active for parallel "
                        + p.getId(), entry);
                    legalConfig = false;
                }
            } else {
                if (count.size() > 1) {
                    errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
                        "Multiple OR states active for state "
                        + tt.getId(), entry);
                    legalConfig = false;
                }
            }
            count.clear(); //cleanup
        }
        if (scxmlCount.size() > 1) {
            errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
                    "Multiple top-level OR states active!", scxmlCount);
        }
        //cleanup
        scxmlCount.clear();
        counts.clear();
        return legalConfig;
    }
View Full Code Here

Examples of java.util.IdentityHashMap

    return null;
  }

  private void setPlaceholderData(ASTNode node, PlaceholderData data) {
    if (this.placeholderNodes == null) {
      this.placeholderNodes= new IdentityHashMap();
    }
    this.placeholderNodes.put(node, data);
  }
View Full Code Here

Examples of java.util.IdentityHashMap

    this.content= content;
    this.lineInfo= lineInfo;
    this.nodeInfos= nodeInfos;
    this.tokenScanner= null;
    this.currentEdit= rootEdit;
    this.sourceCopyInfoToEdit= new IdentityHashMap();
    this.sourceCopyEndNodes= new Stack();

    this.formatter= new ASTRewriteFormatter(nodeInfos, eventStore, options, lineDelim);

    this.extendedSourceRangeComputer = extendedSourceRangeComputer;
View Full Code Here

Examples of java.util.IdentityHashMap

          enclosingType, oldReturnType, false, true, true, x.isPrivate());

      // Setup all params and locals; map from the old method to the new method
      JParameter thisParam = program.createParameter(null,
          "this$static".toCharArray(), enclosingType, true, newMethod);
      Map/* <JVariable, JVariable> */varMap = new IdentityHashMap();
      for (int i = 0; i < x.params.size(); ++i) {
        JParameter oldVar = (JParameter) x.params.get(i);
        JParameter newVar = program.createParameter(oldVar.getSourceInfo(),
            oldVar.getName().toCharArray(), oldVar.getType(), oldVar.isFinal(),
            newMethod);
        varMap.put(oldVar, newVar);
      }
      newMethod.freezeParamTypes();

      // Copy all locals over to the new method
      for (int i = 0; i < x.locals.size(); ++i) {
        JLocal oldVar = (JLocal) x.locals.get(i);
        JLocal newVar = program.createLocal(oldVar.getSourceInfo(),
            oldVar.getName().toCharArray(), oldVar.getType(), oldVar.isFinal(),
            newMethod);
        varMap.put(oldVar, newVar);
      }
      x.locals.clear();

      // Move the body of the instance method to the static method
      newMethod.body.statements.addAll(x.body.statements);
View Full Code Here

Examples of java.util.IdentityHashMap

    }

    private class EVLeafComparator implements Comparator {
        private Map<Object, Integer> origOrder;
        private EVLeafComparator(List<EVTask> origList) {
            origOrder = new IdentityHashMap();
            int pos = 0;
            for (EVTask t : origList)
                origOrder.put(t, pos++);
        }
View Full Code Here
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.