Examples of PojoBean


Examples of com.caucho.config.gen.PojoBean

      if (_isGenerateInterception) {
        if (! _beanType.isAnnotationPresent(javax.interceptor.Interceptor.class)
            && ! _beanType.isAnnotationPresent(javax.decorator.Decorator.class)) {
          ApiClass apiClass = new ApiClass(_beanType, true);

          PojoBean bean = new PojoBean(apiClass);
          bean.introspect();

          instanceClass = (Class<X>) bean.generateClass();
        }

        if (instanceClass == getTargetClass() && isSerializeHandle()) {
          instanceClass = SerializationAdapter.gen(instanceClass);
        }
View Full Code Here

Examples of jodd.petite.data.PojoBean

    pc.registerPetiteCtorInjectionPoint("pojo", null, null);
    pc.registerPetitePropertyInjectionPoint("pojo", "service", "someService");
    pc.registerPetiteMethodInjectionPoint("pojo", "injectService", null, new String[]{"someService"});
    pc.registerPetiteInitMethods("pojo", POST_INITIALIZE, "init");

    PojoBean pojoBean = (PojoBean) pc.getBean("pojo");
    SomeService ss = (SomeService) pc.getBean("someService");

    assertNotNull(pojoBean);
    assertNotNull(ss);
    assertSame(ss, pojoBean.fservice);
View Full Code Here

Examples of jodd.petite.data.PojoBean

    petite(pc).wire("pojo").ctor().bind();
    petite(pc).wire("pojo").property("service").ref("someService").bind();
    petite(pc).wire("pojo").method("injectService").ref("someService").bind();
    petite(pc).init("pojo").invoke(POST_INITIALIZE).methods("init").register();

    PojoBean pojoBean = (PojoBean) pc.getBean("pojo");
    SomeService ss = (SomeService) pc.getBean("someService");

    assertNotNull(pojoBean);
    assertNotNull(ss);
    assertSame(ss, pojoBean.fservice);
View Full Code Here

Examples of jodd.petite.data.PojoBean

    pc.registerPetiteCtorInjectionPoint("pojo", null, null);
    pc.registerPetitePropertyInjectionPoint("pojo", "service", "someService");
    pc.registerPetiteMethodInjectionPoint("pojo", "injectService", null, new String[] {"someService"});
    pc.registerPetiteInitMethods("pojo", POST_INITIALIZE, "init");

    PojoBean pojoBean = (PojoBean) pc.getBean("pojo");
    SomeService ss = (SomeService) pc.getBean("someService");

    assertNotNull(pojoBean);
    assertNotNull(ss);
    assertSame(ss, pojoBean.fservice);
View Full Code Here

Examples of jodd.petite.data.PojoBean

    petite(pc).wire("pojo").ctor().bind();
    petite(pc).wire("pojo").property("service").ref("someService").bind();
    petite(pc).wire("pojo").method("injectService").ref("someService").bind();
    petite(pc).init("pojo").invoke(POST_INITIALIZE).methods("init").register();

    PojoBean pojoBean = (PojoBean) pc.getBean("pojo");
    SomeService ss = (SomeService) pc.getBean("someService");

    assertNotNull(pojoBean);
    assertNotNull(ss);
    assertSame(ss, pojoBean.fservice);
View Full Code Here

Examples of net.test.simple.core._03_beans.pojo.PojoBean

                //
                apiBinder.bindType(PojoBean.class).nameWith("myBean1").toScope(myScope1);
            }
        });
        //
        PojoBean myBean = null;
        myBean = appContext.findBindingBean("myBean1", PojoBean.class);
        System.out.println("Scope 1 : " + myBean.getName() + myBean);
        myBean = appContext.findBindingBean("myBean1", PojoBean.class);
        System.out.println("Scope 1 : " + myBean.getName() + myBean);
    }
View Full Code Here

Examples of net.test.simple.core._03_beans.pojo.PojoBean

            }
        });
        //
        //
        //通过绑定的类型获取Bean
        PojoBean myBean1 = appContext.getInstance(PojoBean.class);
        System.out.println(myBean1.getName() + "\t" + myBean1);
    }
View Full Code Here

Examples of net.test.simple.core._03_beans.pojo.PojoBean

    public void singletonBindTest() throws IOException, URISyntaxException, InterruptedException {
        System.out.println("--->>singletonBindTest<<--");
        //1.创建一个标准的 Hasor 容器。
        AppContext appContext = Hasor.createAppContext(new Module() {
            public void loadModule(ApiBinder apiBinder) throws Throwable {
                PojoBean pojo = new PojoBean();
                pojo.setName("马大帅");
                apiBinder.bindType(PojoBean.class).idWith("myBean1").toInstance(pojo);
            }
        });
        //
        PojoBean myBean1 = appContext.getInstance("myBean1");
        System.out.println(myBean1.getName() + "\t" + myBean1);
        PojoBean myBean2 = appContext.getInstance("myBean1");
        System.out.println(myBean2.getName() + "\t" + myBean2);
    }
View Full Code Here

Examples of net.test.simple.core._03_beans.pojo.PojoBean

        AppContext appContext = Hasor.createAppContext(new Module() {
            public void loadModule(ApiBinder apiBinder) throws Throwable {
                //Bean1
                apiBinder.bindType(PojoBean.class).idWith("myBean1");
                //Bean2
                PojoBean pojo = new PojoBean();
                pojo.setName("马大帅");
                apiBinder.bindType(PojoBean.class).idWith("myBean2").toInstance(pojo);
            }
        });
        //
        PojoBean myBean1 = appContext.getInstance("myBean1");
        System.out.println(myBean1.getName() + "\t" + myBean1);
        PojoBean myBean2 = appContext.getInstance("myBean2");
        System.out.println(myBean2.getName() + "\t" + myBean2);
    }
View Full Code Here

Examples of org.jboss.aspects.currentinvocation.test.basic.PojoBean

   {
      // Set TCL
      Thread.currentThread().setContextClassLoader(PojoBean.class.getClassLoader());
     
      // Ensure current invocation is accessible from within context
      TestCase.assertEquals("Current Invocation for this Thread was null", true, new PojoBean()
            .canGetCurrentInvocation());
      // Ensure context is cleansed after completion
      TestCase.assertEquals("Current Invocation was not cleansed after interception completed", null, CurrentInvocation
            .getCurrentInvocation());
   }
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.