Examples of Initializer


Examples of alt.jiapi.jazzpect.Initializer


    public Sample1(String className) throws Exception {
        // For some reason, if resolution is "*", instrumentation fails
        // Initializer i = new Initializer("samples.*", this);
        Initializer i =
            new Initializer(new String[] {"samples.*"}, null,
                            "samples.*", this);
        // Run the main method of class
        i.runMainMethod(className, null);

        // alternatively, we could get the classloader from initializer
        // and load the class manually. If done this way, care must
        // be taken, that *all* the relevant(application) classes are loaded
        // by i.getClassLoader().
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.decora.decoraDsl.initializer

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetE(initializer newE, NotificationChain msgs)
  {
    initializer oldE = e;
    e = newE;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DecoraDslPackage.DECLARATION_IDENTIFIER_AND_INIT__E, oldE, newE);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of co.paralleluniverse.actors.behaviors.Initializer

                }
                break;
            case testGenEvent:
                if (i == 1) {
                    final DelayedVal<String> dv = new DelayedVal<>();
                    spawnGenEvent(new Initializer() {
                        @Override
                        public void init() throws SuspendExecution {
                            EventSourceActor.currentEventSourceActor().register("myEventServer");
                            try {
                                final EventSource<String> ge = LocalActor.self();
                                ge.addHandler(new EventHandler<String>() {
                                    @Override
                                    public void handleEvent(String event) {
                                        dv.set(event);
                                        System.out.println("sout " + event);
                                        ge.shutdown();
                                    }
                                });
                            } catch (InterruptedException ex) {
                                System.out.println(ex);
                            }
                        }

                        @Override
                        public void terminate(Throwable cause) throws SuspendExecution {
                            System.out.println("terminated");
                        }
                    });
                    String get = dv.get();
                    System.out.println("got msg " + get);
                    assert get.equals("hello world");
                } else {
                    spawnActor(new BasicActor<Message, Void>() {
                        protected Void doRun() throws SuspendExecution, InterruptedException {
                            final EventSource<String> ge = (EventSource) ActorRegistry.getActor("myEventServer");
                            ge.notify("hello world");
                            return null;
                        }
                    }).join();
                }
                break;
            case testMultiGetActor:
                if (i == 1) {
                    spawnGenEvent(new Initializer() {
                        AtomicInteger ai = new AtomicInteger();

                        @Override
                        public void init() throws SuspendExecution {
                            Actor.currentActor().register("myEventServer");
                            try {
                                final EventSource<String> ge = LocalActor.self();
                                ge.addHandler(new EventHandler<String>() {
                                    @Override
                                    public void handleEvent(String event) {
                                        System.out.println("msg no " + ai.incrementAndGet() + ": " + event);
                                    }
                                });
                            } catch (InterruptedException ex) {
                                System.out.println(ex);
                            }
                        }

                        @Override
                        public void terminate(Throwable cause) throws SuspendExecution {
                            System.out.println("terminated");
                        }
                    }).join();
                } else {
                    Queue<Actor> queue = new LinkedList<>();
                    for (int j = 0; j < 1000; j++) {
                        final BasicActor<Message, Void> actor = spawnActor(new BasicActor<Message, Void>("actor-" + j) {
                            protected Void doRun() throws SuspendExecution, InterruptedException {
                                try {
                                    final EventSource<String> ge = (EventSource) ActorRegistry.getActor("myEventServer");
                                    ge.notify("hwf " + getName());
                                } catch (Exception e) {
                                    System.out.println("error in " + getName());
                                    throw e;
                                }
                                return null;
                            }
                        });
                        queue.add(actor);
//                        actor.join();
                    }
                    for (Actor localActor : queue)
                        localActor.join();
                    Thread.sleep(500);

                }
                break;
            case testOrdering:
                if (i == 1) {
                    spawnGenEvent(new Initializer() {
                        AtomicInteger ai = new AtomicInteger();

                        @Override
                        public void init() throws SuspendExecution {
                            EventSourceActor.currentEventSourceActor().register("myEventServer");
View Full Code Here

Examples of com.aelitis.azureus.ui.swt.Initializer

        }
      });
    }
   
    if (!AzureusCoreFactory.isCoreRunning()) {
      final Initializer initializer = Initializer.getLastInitializer();
      if (initializer != null) {
        initializer.addListener(new InitializerListener() {
          public void reportPercent(final int percent) {
            Utils.execSWTThread(new AERunnable() {
              public void runSupport() {
                if (soWaitProgress != null && !soWaitProgress.isDisposed()) {
                  soWaitProgress.setData("progress", new Long(percent));
                  soWaitProgress.getControl().redraw();
                  soWaitProgress.getControl().update();
                }
              }
            });
            if (percent > 100) {
              initializer.removeListener(this);
            }
          }
       
          public void reportCurrentTask(String currentTask) {
            if (soWaitTask != null && !soWaitTask.isDisposed()) {
View Full Code Here

Examples of com.aelitis.azureus.ui.swt.Initializer

    if (!AzureusCoreFactory.isCoreRunning()) {
      if (soWait != null) {
        soWait.setVisible(true);
        //soWait.getControl().getParent().getParent().getParent().layout(true, true);
      }
      final Initializer initializer = Initializer.getLastInitializer();
      if (initializer != null) {
        initializer.addListener(new InitializerListener() {
          public void reportPercent(final int percent) {
            Utils.execSWTThread(new AERunnable() {
              public void runSupport() {
                if (soWaitProgress != null && !soWaitProgress.isDisposed()) {
                  waitProgress = percent;
                  soWaitProgress.getControl().redraw();
                  soWaitProgress.getControl().update();
                }
              }
            });
            if (percent > 100) {
              initializer.removeListener(this);
            }
          }

          public void reportCurrentTask(String currentTask) {
            if (soWaitTask != null && !soWaitTask.isDisposed()) {
View Full Code Here

Examples of com.arjuna.mwlabs.wscf.protocols.Initializer

    // TODO sort out configuration!

    try
    {
      Initializer init = new Initializer(this);
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
View Full Code Here

Examples of com.arjuna.mwlabs.wscf11.protocols.Initializer

    // TODO sort out configuration!

    try
    {
      Initializer init = new Initializer(this);
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
View Full Code Here

Examples of flex2.compiler.mxml.rep.init.Initializer

        Iterator<Initializer> iterator = mxmlDocument.getRoot().getEventInitializerIterator();

        while (iterator.hasNext())
        {
            Initializer initializer = iterator.next();
            ThisExpressionNode thisExpression = nodeFactory.thisExpression(-1);
            result = initializer.generateAssignExpr(nodeFactory, configNamespaces, generateDocComments,
                                                    result, thisExpression);
        }

        return result;
    }
View Full Code Here

Examples of javassist.CtField.Initializer

      if (!isInstrumented(superclass)) {
         if (!isInstrumentable(superclass)) {
            //we're the top-most instrumentable class, so add the handler field
           CtField handlerField = new CtField(handlerClass, "handler", implementation);
           handlerField.setModifiers(Modifier.PROTECTED);
           Initializer handlerInitializer = Initializer.byCall(handlerClass, "create");
           implementation.addField(handlerField, handlerInitializer);
           CtMethod getHandlerMethod = CtNewMethod.getter("getHandler", handlerField);
           implementation.addMethod(getHandlerMethod);
         }
         else {
            //in order for the below code to make reference to the handler instance we need to
            //recursively instrument until we reach the top of the instrumentable class tree
            instrumentClass(superclass);
         }
      }

      CtField wicketComponentField = new CtField(componentClass, "component", implementation);
      wicketComponentField.setModifiers(Modifier.STATIC);
      Initializer componentInit = Initializer.byExpr("new org.jboss.seam.wicket.WicketComponent(" + className + ".class)");
      implementation.addField(wicketComponentField, componentInit);

      CtClass exception = classPool.get(Exception.class.getName());

      implementation.addInterface(getInstrumentedComponentInterface());
View Full Code Here

Examples of javolution.lang.Initializer

    return (XMLOutputFactory) XML_OUTPUT_FACTORY_TRACKER.getServices()[0];
  }

  /** Initializes all real-time classes. */
  public static synchronized boolean initializeRealtimeClasses() {
    Initializer initializer = new Initializer(OSGiServices.class.getClassLoader());
    initializer.loadClass(MathLib.class);
    initializer.loadClass(Text.class);
    initializer.loadClass(TypeFormat.class);
    initializer.loadClass(Struct.class);
    initializer.loadClass(FastBitSet.class);
    initializer.loadClass(FastSortedMap.class);
    initializer.loadClass(FastSortedSet.class);
    initializer.loadClass(FastSortedTable.class);
    initializer.loadClass(Index.class); // Preallocates.
    initializer.loadClass(Reducers.class);
    initializer.loadClass(Equalities.class);
    initializer.loadClass(XMLStreamReaderImpl.class);
    initializer.loadClass(XMLStreamWriterImpl.class);
    return initializer.initializeLoadedClasses();
  }
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.