+
+ private static void addBlueprintBundleRefProperty(final ParserContext context, final MutableBeanMetadata metadata) {
+ metadata.addProperty("bundle", createRef(context, "blueprintBundle"));
+ }
+
+ private static MutableBeanMetadata createBeanMetadata(final ParserContext context, final String id,
+ final Class<?> runtimeClass, final boolean initMethod, final boolean destroyMethod) {
+ MutableBeanMetadata metadata = context.createMetadata(MutableBeanMetadata.class);
+ metadata.setId(id);
+ metadata.setScope(BeanMetadata.SCOPE_SINGLETON);
+ metadata.setActivation(ReferenceMetadata.ACTIVATION_EAGER);
+ metadata.setRuntimeClass(runtimeClass);
+
+ if (initMethod) {
+ metadata.setInitMethod("init");
+ }
+
+ if (destroyMethod) {
+ metadata.setDestroyMethod("destroy");
+ }
+
+ return metadata;
+ }