Examples of TObjectIntHashMap


Examples of gnu.trove.TObjectIntHashMap

        // keep track of the state we already had
        String targetSoFar = context.m_targetBoundedName;
        String thisSoFar = context.m_thisBoundedName;
        boolean targetWithRuntimeCheckSoFar = context.m_targetWithRuntimeCheck;
        TObjectIntHashMap exprIndexToTargetIndexSoFar = (TObjectIntHashMap) context.m_exprIndexToTargetIndex.clone();

        context.resetRuntimeState();
        Boolean match = referenced.matchUndeterministic(context);

        // merge the state
        if (context.m_targetBoundedName == null) {
            context.m_targetBoundedName = targetSoFar;
        } else if (targetSoFar != null) {
            if (node.jjtGetNumChildren() == 1) {
                String referenceCallArg = ((ASTArgParameter) node.jjtGetChild(0)).getTypePattern().getPattern();
                if (!targetSoFar.equals(referenceCallArg)) {
                    throw new UnsupportedOperationException("should not occur");
                }
            }
        }
        if (context.m_thisBoundedName == null) {
            context.m_thisBoundedName = thisSoFar;
        } else if (thisSoFar != null) {
            if (node.jjtGetNumChildren() == 1) {
                String referenceCallArg = ((ASTArgParameter) node.jjtGetChild(0)).getTypePattern().getPattern();
                if (!thisSoFar.equals(referenceCallArg)) {
                    throw new UnsupportedOperationException("should not occur");
                }
            }
        }
        if (!context.m_targetWithRuntimeCheck) {
            // restore
            context.m_targetWithRuntimeCheck = targetWithRuntimeCheckSoFar;
        }
        if (context.m_exprIndexToTargetIndex.isEmpty()) {
            // restore
            context.m_exprIndexToTargetIndex = exprIndexToTargetIndexSoFar;
        } else if (!exprIndexToTargetIndexSoFar.isEmpty()) {
            //should merge ?
            throw new UnsupportedOperationException("should not occur");
        }


        // update the this and target bounded name from this last visit as well as args
        TObjectIntHashMap exprToTargetArgIndexes = new TObjectIntHashMap();
        for (int i = 0; i < node.jjtGetNumChildren(); i++) {
            String referenceCallArg = ((ASTArgParameter) node.jjtGetChild(i)).getTypePattern().getPattern();
            String referentArg = expressionInfo.getArgumentNameAtIndex(i);
            if (referentArg.equals(context.m_targetBoundedName)) {
                context.m_targetBoundedName = referenceCallArg;
                assertIsInstanceOf(
                        expressionInfo.getArgumentType(referentArg),
                        m_expressionInfo.getArgumentType(referenceCallArg)
                );
            } else if (referentArg.equals(context.m_thisBoundedName)) {
                context.m_thisBoundedName = referenceCallArg;
                assertIsInstanceOf(
                        expressionInfo.getArgumentType(referentArg),
                        m_expressionInfo.getArgumentType(referenceCallArg)
                );
            } else {
                int adviceArgIndex = i;
                if (context.m_exprIndexToTargetIndex.containsKey(referentArg)) {
                    int targetArgIndex = context.m_exprIndexToTargetIndex.get(referentArg);
                    exprToTargetArgIndexes.put(referenceCallArg, targetArgIndex);
                }

            }
        }
        // merge with index found so far (inlined args() f.e.)
        Object[] soFar = exprIndexToTargetIndexSoFar.keys();
        for (int i = 0; i < soFar.length; i++) {
            String name = (String) soFar[i];
            if (!exprToTargetArgIndexes.containsKey(name)) {
                exprToTargetArgIndexes.put(name, exprIndexToTargetIndexSoFar.get(name));
            }
        }
        context.m_exprIndexToTargetIndex = exprToTargetArgIndexes;
        return match;
    }
View Full Code Here

Examples of gnu.trove.map.hash.TObjectIntHashMap

  ArrayList entries;
  boolean growthStopped = false;
  Class entryClass = null;

  public RyanAlphabet(int capacity, Class entryClass) {
    this.map = new TObjectIntHashMap(capacity);
    this.entries = new ArrayList(capacity);
    this.entryClass = entryClass;
  }
View Full Code Here

Examples of gnu.trove.map.hash.TObjectIntHashMap

  public Object clone() {
    //try {
    // Wastes effort, because we over-write ivars we create
    RyanAlphabet ret = new RyanAlphabet();
    ret.map = new TObjectIntHashMap(map);
    ret.entries = (ArrayList) entries.clone();
    ret.growthStopped = growthStopped;
    ret.entryClass = entryClass;
    return ret;
    //} catch (CloneNotSupportedException e) {
View Full Code Here

Examples of gnu.trove.map.hash.TObjectIntHashMap

  private void readObject(ObjectInputStream in) throws IOException,
                                                       ClassNotFoundException {
    int version = in.readInt();
    int size = in.readInt();
    entries = new ArrayList(size);
    map = new TObjectIntHashMap(size);
    for (int i = 0; i < size; i++) {
      Object o = in.readObject();
      map.put(o, i);
      entries.add(o);
    }
View Full Code Here

Examples of gnu.trove.map.hash.TObjectIntHashMap



            for (int x = 0; x < Binding.bindedObjectTypes; x++) {

            Binding.bindingCodes[x] = new TObjectIntHashMap();

        }   //for (x = 0; x < 100; x++) {
            //
            //        }
            Binding.bindingListCodes.add(new TObjectIntHashMap[10]);
            for (int x = 0; x < 10; x++) {
            Binding.bindingListCodes.get(0)[x] = new TObjectIntHashMap();
            }
            StoryList.lastStoryList = StoryList.globalStoryList;
            Detonator.INSTANCE.zeroBranch = Binding.getBinding(Binding.branchBinding, "0");

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.