Package rocket.generator.rebind.type

Examples of rocket.generator.rebind.type.Type.findMethod()


  protected void overrideFactoryBeanCreateInstanceFactoryMethod(final Bean bean) {
    Checker.notNull("parameter:bean", bean);

    final Type beanType = bean.getType();
    final String factoryMethodName = bean.getFactoryMethod();
    final Method factoryMethod = beanType.findMethod(factoryMethodName, Collections.<Type>emptyList() );
    if (null == factoryMethod || false == factoryMethod.isStatic() || factoryMethod.getVisibility() != Visibility.PUBLIC) {
      this.throwFactoryMethodNotFound(bean, factoryMethodName);
    }

    this.getGeneratorContext().debug("FactoryBean will create new instance by calling " + factoryMethod);
View Full Code Here


  protected void overrideFactoryBeanSatisfyInit(final Bean bean) {
    Checker.notNull("parameter:bean", bean);

    final Type beanType = bean.getType();
    final String initMethodName = bean.getInitMethod();
    final Method initMethod = beanType.findMethod(initMethodName, Collections.<Type>emptyList());
    if (null == initMethod || initMethod.isStatic() || initMethod.getVisibility() != Visibility.PUBLIC) {
      throwInitMethodNotFound(bean, initMethodName);
    }

    final GeneratorContext context = this.getGeneratorContext();
View Full Code Here

  protected void overrideSingletonFactoryBeanDestroy(final Bean bean) {
    Checker.notNull("parameter:bean", bean);

    final Type beanType = bean.getType();
    final String destroyMethodName = bean.getDestroyMethod();
    final Method destroyMethod = beanType.findMethod(destroyMethodName, Collections.<Type>emptyList());
    if (null == destroyMethod || destroyMethod.isStatic() || destroyMethod.getVisibility() != Visibility.PUBLIC) {
      throwCustomMethodNotFound(bean, destroyMethodName);
    }

    final GeneratorContext context = this.getGeneratorContext();
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.