Examples of helloWorld()


Examples of helloworld.behavioral.visitor.HelloWorldCharacterVisitor.helloWorld()

        System.out.println("23. Visitor: ");
        HelloWorldCharacterElements helloWorldCharacterElements = new HelloWorldCharacterElements("Hello Visitor!".toCharArray());
        HelloWorldCharacterVisitor helloWorldCharacterVisitor = new HelloWorldCharacterVisitor();
        helloWorldCharacterElements.accept(helloWorldCharacterVisitor);
        System.out.println(helloWorldCharacterVisitor.helloWorld());

    }
}
View Full Code Here

Examples of helloworld.structural.adapter.HelloWorldAdapter.helloWorld()

        System.out.println("====================================");
        System.out.println("We are structural patterns!");

        System.out.println("6. Adapter: ");
        HelloWorld adapterHelloWorld = new HelloWorldAdapter(new HelloAdapterDesignPattern());
        System.out.println(adapterHelloWorld.helloWorld());

        System.out.println("7. Bridge: ");
        HelloWorld bridgeHelloWorld = new HelloWorldBridge(new DesignPatternWorldImpl());
        //leave bridgeHelloWorld' output to compositeHelloWorld
View Full Code Here

Examples of helloworld.structural.composite.CompositeHelloWorld.helloWorld()

        HelloWorld bridgeHelloWorld = new HelloWorldBridge(new DesignPatternWorldImpl());
        //leave bridgeHelloWorld' output to compositeHelloWorld

        System.out.println("8. Composite: ");
        HelloWorld compositeHelloWorld = new CompositeHelloWorld(bridgeHelloWorld, new CompositeHelloWorld.DefaultHelloWorld());
        System.out.println(compositeHelloWorld.helloWorld());

        System.out.println("9. Decorator: ");
        HelloWorldDecorator decoratorHelloWorld = new HelloWorldDecorator(new HelloWorldDecorator.DefaultHelloWorld());
        System.out.println(decoratorHelloWorld.helloDecorator());
View Full Code Here

Examples of helloworld.structural.proxy.HelloWorldProxy.helloWorld()

        HelloWorld flyWeightHelloWorld = HelloWorldFlyWeightFactory.instance().createHelloWorld("Hello Flyweight!");
        System.out.println(flyWeightHelloWorld.helloWorld());

        System.out.println("12. Proxy: ");
        HelloWorld proxyHelloWorld = new HelloWorldProxy(new HelloWorldProxy.DefaultHelloWorld());
        System.out.println(proxyHelloWorld.helloWorld());

        System.out.println("====================================");
        System.out.println("We are behavioral patterns!");

        System.out.println("13. Chain of Responsibility: ");
View Full Code Here

Examples of org.ow2.easybeans.examples.statelessbean.StatelessRemote.helloWorld()

        StatelessRemote statelessBean = (StatelessRemote) initialContext
                .lookup("org.ow2.easybeans.examples.statelessbean.StatelessBean"
                        + "_" + StatelessRemote.class.getName() + "@Remote");

        System.out.println("Calling helloWorld method...");
        statelessBean.helloWorld();

        System.out.println("Add 1 + 2...");
        int resultAdd = statelessBean.add(1, 2);
        System.out.println("Sum = '" + resultAdd + "'.");
View Full Code Here

Examples of us.codecraft.tinyioc.HelloWorldService.helloWorld()

    @Test
    public void test() throws Exception {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc.xml");
        HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
        helloWorldService.helloWorld();
    }

    @Test
    public void testPostBeanProcessor() throws Exception {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc-postbeanprocessor.xml");
View Full Code Here

Examples of us.codecraft.tinyioc.HelloWorldService.helloWorld()

    @Test
    public void testPostBeanProcessor() throws Exception {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc-postbeanprocessor.xml");
        HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
        helloWorldService.helloWorld();
    }
}
View Full Code Here

Examples of us.codecraft.tinyioc.HelloWorldService.helloWorld()

  @Test
  public void testInterceptor() throws Exception {
    // --------- helloWorldService without AOP
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc.xml");
    HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
    helloWorldService.helloWorld();

    // --------- helloWorldService with AOP
    // 1. 设置被代理对象(Joinpoint)
    AdvisedSupport advisedSupport = new AdvisedSupport();
    TargetSource targetSource = new TargetSource(helloWorldService, HelloWorldServiceImpl.class,
View Full Code Here

Examples of us.codecraft.tinyioc.HelloWorldService.helloWorld()

    // 3. 创建代理(Proxy)
    JdkDynamicAopProxy jdkDynamicAopProxy = new JdkDynamicAopProxy(advisedSupport);
    HelloWorldService helloWorldServiceProxy = (HelloWorldService) jdkDynamicAopProxy.getProxy();

    // 4. 基于AOP的调用
    helloWorldServiceProxy.helloWorld();

  }
}
View Full Code Here

Examples of us.codecraft.tinyioc.HelloWorldService.helloWorld()

  @Test
  public void testInterceptor() throws Exception {
    // --------- helloWorldService without AOP
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc.xml");
    HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
    helloWorldService.helloWorld();

    // --------- helloWorldService with AOP
    // 1. 设置被代理对象(Joinpoint)
    AdvisedSupport advisedSupport = new AdvisedSupport();
    TargetSource targetSource = new TargetSource(helloWorldService, HelloWorldServiceImpl.class,
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.