Package java.util

Examples of java.util.ArrayList.clone()


        // Check cache, even for null nat
        SoftReference ref = (SoftReference)getFlavorsForNativeCache.get(nat);
        if (ref != null) {
            ArrayList retval = (ArrayList)ref.get();
            if (retval != null) {
                return (List)retval.clone();
            }
        }

        LinkedList retval = new LinkedList();
View Full Code Here


            }
        }

        ArrayList arrayList = new ArrayList(retval);
        getFlavorsForNativeCache.put(nat, new SoftReference(arrayList));
        return (List)arrayList.clone();
    }

    /**
     * Returns a <code>Map</code> of the specified <code>DataFlavor</code>s to
     * their most preferred <code>String</code> native. Each native value will
View Full Code Here

   *         or null if no services is available.
   */
  synchronized ArrayList get(String clazz) {
    ArrayList v = (ArrayList) classServices.get(clazz);
    if (v != null) {
      return (ArrayList)v.clone();
    }
    return null;
  }


View Full Code Here

    if (this.focusType != null) {
      System.out.println("    for hierarchy focused on " + ((JavaElement)this.focusType).toStringWithAncestors()); //$NON-NLS-1$
    }
  }
  // clone so that a listener cannot have a side-effect on this list when being notified
  listeners = (ArrayList)listeners.clone();
  for (int i= 0; i < listeners.size(); i++) {
    final ITypeHierarchyChangedListener listener= (ITypeHierarchyChangedListener)listeners.get(i);
    SafeRunner.run(new ISafeRunnable() {
      public void handleException(Throwable exception) {
        Util.log(exception, "Exception occurred in listener of Type hierarchy change notification"); //$NON-NLS-1$
View Full Code Here

        if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ){
          throw new AssertionViolatedException("RET '"+u.getInstruction()+"' info inconsistent: jump back to '"+theSuccessor+"' or '"+cfg.contextOf(jsr.physicalSuccessor())+"'?");
        }
       
        if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
          icq.add(theSuccessor, (ArrayList) newchain.clone());
        }
      }
      else{// "not a ret"
     
        // Normal successors. Add them to the queue of successors.
View Full Code Here

        // Normal successors. Add them to the queue of successors.
        InstructionContext[] succs = u.getSuccessors();
        for (int s=0; s<succs.length; s++){
          InstructionContext v = succs[s];
          if (v.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
            icq.add(v, (ArrayList) newchain.clone());
          }
        }
      }// end "not a ret"

      // Exception Handlers. Add them to the queue of successors.
View Full Code Here

   protected ArrayList cloneClassLoaders()
   {
      ArrayList loaders = getClassLoaders();
      synchronized (loaders)
      {
         return (ArrayList)loaders.clone();
      }
   }

   protected ArrayList getClassLoaders()
   {
View Full Code Here

        if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ){
          throw new AssertionViolatedException("RET '"+u.getInstruction()+"' info inconsistent: jump back to '"+theSuccessor+"' or '"+cfg.contextOf(jsr.physicalSuccessor())+"'?");
        }
       
        if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
          icq.add(theSuccessor, (ArrayList) newchain.clone());
        }
      }
      else{// "not a ret"
     
        // Normal successors. Add them to the queue of successors.
View Full Code Here

        // Normal successors. Add them to the queue of successors.
        InstructionContext[] succs = u.getSuccessors();
        for (int s=0; s<succs.length; s++){
          InstructionContext v = succs[s];
          if (v.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
            icq.add(v, (ArrayList) newchain.clone());
          }
        }
      }// end "not a ret"

      // Exception Handlers. Add them to the queue of successors.
View Full Code Here

        if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ){
          throw new AssertionViolatedException("RET '"+u.getInstruction()+"' info inconsistent: jump back to '"+theSuccessor+"' or '"+cfg.contextOf(jsr.physicalSuccessor())+"'?");
        }
       
        if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
          icq.add(theSuccessor, (ArrayList) newchain.clone());
        }
      }
      else{// "not a ret"
     
        // Normal successors. Add them to the queue of successors.
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.