/** * Set the destroy method for this definition. */ public BeanDefinitionBuilder setDestroyMethodName(@Nullable String methodName) { this.beanDefinition.setDestroyMethodName(methodName); return this; }
/** * Set the destroy method for this definition. */ public BeanDefinitionBuilder setDestroyMethodName(@Nullable String methodName) { this.beanDefinition.setDestroyMethodName(methodName); return this; }
public BeanConfiguration setDestroyMethod(String methodName) { getBeanDefinition().setDestroyMethodName(methodName); return this; }
bd.setDestroyMethodName(newValue.toString());
bd.setDestroyMethodName(destroyMethodName); bd.setDestroyMethodName(this.defaults.getDestroyMethod()); bd.setEnforceDestroyMethod(false);
bd.setDestroyMethodName(newValue.toString());
@Override protected void parseNested(Element element, ParserContext parserContext, BeanDefinitionBuilder builder, BeanDefinition bd) { bd.setFactoryBeanName(element.getAttribute( RedissonNamespaceParserSupport.REDISSON_REF_ATTRIBUTE)); String typeName = Conventions.attributeNameToPropertyName(element.getLocalName()); bd.setFactoryMethodName("get" + StringUtils.capitalize(typeName)); helper.addConstructorArgs(element, KEY_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, TOPIC_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, PATTERN_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, SERVICE_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, CODEC_REF_ATTRIBUTE, Codec.class, builder); if (RDestroyable.class.isAssignableFrom(getBeanClass(element))) { ((AbstractBeanDefinition) bd).setDestroyMethodName("destroy"); } }
@Override protected void parseNested(Element element, ParserContext parserContext, BeanDefinitionBuilder builder, BeanDefinition bd) { bd.setFactoryBeanName(element.getAttribute( RedissonNamespaceParserSupport.REDISSON_REF_ATTRIBUTE)); String typeName = Conventions.attributeNameToPropertyName(element.getLocalName()); bd.setFactoryMethodName("get" + StringUtils.capitalize(typeName)); helper.addConstructorArgs(element, KEY_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, TOPIC_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, PATTERN_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, SERVICE_ATTRIBUTE, String.class, builder); helper.addConstructorArgs(element, CODEC_REF_ATTRIBUTE, Codec.class, builder); if (RDestroyable.class.isAssignableFrom(getBeanClass(element))) { ((AbstractBeanDefinition) bd).setDestroyMethodName("destroy"); } }
bd.setDestroyMethodName(destroyMethodName); bd.setDestroyMethodName(this.defaults.getDestroyMethod()); bd.setEnforceDestroyMethod(false);
bd.setDestroyMethodName(newValue.toString());
/** * Apply the provided default values to this bean. * @param defaults the defaults to apply */ public void applyDefaults(BeanDefinitionDefaults defaults) { setLazyInit(defaults.isLazyInit()); setAutowireMode(defaults.getAutowireMode()); setDependencyCheck(defaults.getDependencyCheck()); setInitMethodName(defaults.getInitMethodName()); setEnforceInitMethod(false); setDestroyMethodName(defaults.getDestroyMethodName()); setEnforceDestroyMethod(false); }
/** * Set the destroy method for this definition. */ public BeanDefinitionBuilder setDestroyMethodName(String methodName) { this.beanDefinition.setDestroyMethodName(methodName); return this; }
/** * Apply the provided default values to this bean. * @param defaults the defaults to apply */ public void applyDefaults(BeanDefinitionDefaults defaults) { setLazyInit(defaults.isLazyInit()); setAutowireMode(defaults.getAutowireMode()); setDependencyCheck(defaults.getDependencyCheck()); setInitMethodName(defaults.getInitMethodName()); setEnforceInitMethod(false); setDestroyMethodName(defaults.getDestroyMethodName()); setEnforceDestroyMethod(false); }
setDestroyMethodName(otherAbd.getDestroyMethodName()); setEnforceDestroyMethod(otherAbd.isEnforceDestroyMethod());
setDestroyMethodName(otherAbd.getDestroyMethodName()); setEnforceDestroyMethod(otherAbd.isEnforceDestroyMethod());
setInitMethodName(originalAbd.getInitMethodName()); setEnforceInitMethod(originalAbd.isEnforceInitMethod()); setDestroyMethodName(originalAbd.getDestroyMethodName()); setEnforceDestroyMethod(originalAbd.isEnforceDestroyMethod()); setSynthetic(originalAbd.isSynthetic());
private void setBaseProperties(AbstractBeanDefinition definition) { definition.setAbstract(true); definition.setAttribute("foo", "bar"); definition.setAutowireCandidate(false); definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE); // definition.getConstructorArgumentValues().addGenericArgumentValue("foo"); definition.setDependencyCheck(AbstractBeanDefinition.DEPENDENCY_CHECK_OBJECTS); definition.setDependsOn(new String[] { "foo", "bar" }); definition.setDestroyMethodName("destroy"); definition.setEnforceDestroyMethod(false); definition.setEnforceInitMethod(true); definition.setFactoryBeanName("factoryBean"); definition.setFactoryMethodName("factoryMethod"); definition.setInitMethodName("init"); definition.setLazyInit(true); definition.getMethodOverrides().addOverride(new LookupOverride("foo", "bar")); definition.getMethodOverrides().addOverride(new ReplaceOverride("foo", "bar")); definition.getPropertyValues().add("foo", "bar"); definition.setResourceDescription("desc"); definition.setRole(BeanDefinition.ROLE_APPLICATION); definition.setScope(BeanDefinition.SCOPE_PROTOTYPE); definition.setSource("foo"); }
setInitMethodName(originalAbd.getInitMethodName()); setEnforceInitMethod(originalAbd.isEnforceInitMethod()); setDestroyMethodName(originalAbd.getDestroyMethodName()); setEnforceDestroyMethod(originalAbd.isEnforceDestroyMethod()); setSynthetic(originalAbd.isSynthetic());
/** * Apply the provided default values to this bean. * @param defaults the defaults to apply */ public void applyDefaults(BeanDefinitionDefaults defaults) { setLazyInit(defaults.isLazyInit()); setAutowireMode(defaults.getAutowireMode()); setDependencyCheck(defaults.getDependencyCheck()); setInitMethodName(defaults.getInitMethodName()); setEnforceInitMethod(false); setDestroyMethodName(defaults.getDestroyMethodName()); setEnforceDestroyMethod(false); }
setInitMethodName(originalAbd.getInitMethodName()); setEnforceInitMethod(originalAbd.isEnforceInitMethod()); setDestroyMethodName(originalAbd.getDestroyMethodName()); setEnforceDestroyMethod(originalAbd.isEnforceDestroyMethod()); setMethodOverrides(new MethodOverrides(originalAbd.getMethodOverrides()));