private BeanProperty findProperty(MutableBeanMetadata mcm, String springPropertyName) { for (BeanProperty p : mcm.getProperties()) if (p.getName().equals(springPropertyName)) return p; return null; }
private ConstructionInfo selectConstructionMethod(MutableBeanMetadata beanMetadata, MappingMetaData metadata) { Class beanClass = beanMetadata.getRuntimeClass(); // get a set containing the names of the defined properties Set<String> definedProperties = new HashSet<String>(); List<BeanProperty> values = beanMetadata.getProperties(); for (BeanProperty beanProperty : values) { definedProperties.add(beanProperty.getName()); } // first check for a factory method if (beanMetadata.getFactoryMethod() != null) { return selectFactory(beanClass, beanMetadata, metadata, definedProperties); } else { return selectConstructor(beanClass, metadata, definedProperties); } }
private ConstructionInfo selectConstructionMethod(MutableBeanMetadata beanMetadata, MappingMetaData metadata) { Class beanClass = beanMetadata.getRuntimeClass(); // get a set containing the names of the defined properties Set<String> definedProperties = new HashSet<String>(); List<BeanProperty> values = beanMetadata.getProperties(); for (BeanProperty beanProperty : values) { definedProperties.add(beanProperty.getName()); } // first check for a factory method if (beanMetadata.getFactoryMethod() != null) { return selectFactory(beanClass, beanMetadata, metadata, definedProperties); } else { return selectConstructor(beanClass, metadata, definedProperties); } }
List<BeanProperty> beanProperties = beanMetadata.getProperties(); LinkedHashMap<String, BeanProperty> propMap = new LinkedHashMap<String, BeanProperty>(); for (BeanProperty beanProperty : beanProperties) {
List<BeanProperty> beanProperties = beanMetadata.getProperties(); LinkedHashMap<String, BeanProperty> propMap = new LinkedHashMap<String, BeanProperty>(); for (BeanProperty beanProperty : beanProperties) {
private void processMutableBeanMetadata(final MutableBeanMetadata bean) { if (restartDependentsOnUpdates && bean.getRuntimeClass() != null && AbstractPropertyPlaceholder.class.isAssignableFrom(bean.getRuntimeClass())) { LOG.debug("{}: Found PropertyPlaceholder bean: {}, runtime {}", logName(), bean.getId(), bean.getRuntimeClass()); for (BeanProperty prop : bean.getProperties()) { if (CM_PERSISTENT_ID_PROPERTY.equals(prop.getName())) { if (prop.getValue() instanceof ValueMetadata) { ValueMetadata persistentId = (ValueMetadata)prop.getValue(); LOG.debug("{}: Found {} property, value : {}", logName(), CM_PERSISTENT_ID_PROPERTY, persistentId.getStringValue()); registerManagedService(persistentId.getStringValue()); } else { LOG.debug("{}: {} property metadata {} is not instanceof ValueMetadata", logName(), CM_PERSISTENT_ID_PROPERTY, prop.getValue()); } break; } } } }
private void processMutableBeanMetadata(MutableBeanMetadata bean) { if(restartDependentsOnUpdates && bean.getRuntimeClass() != null && AbstractPropertyPlaceholder.class.isAssignableFrom(bean.getRuntimeClass())) { LOG.debug("{}: Found PropertyPlaceholder bean: {}, runtime {}", logName(), bean.getId(), bean.getRuntimeClass()); for(BeanProperty prop: bean.getProperties()) { if(CM_PERSISTENT_ID_PROPERTY.equals(prop.getName())) { if(prop.getValue() instanceof ValueMetadata) { ValueMetadata persistentId = (ValueMetadata)prop.getValue(); LOG.debug("{}: Found {} property, value : {}", logName(), CM_PERSISTENT_ID_PROPERTY, persistentId.getStringValue()); registerManagedService(persistentId.getStringValue()); } else { LOG.debug("{}: {} property metadata {} is not instanceof ValueMetadata", logName(), CM_PERSISTENT_ID_PROPERTY, prop.getValue()); } break; } } } }
public Metadata parse(Element element, ParserContext context) { MutableBeanMetadata attachmentProvider = context.createMetadata(MutableBeanMetadata.class); attachmentProvider.setRuntimeClass(ExternalAttachmentProvider.class); if (hasBusProperty()) { boolean foundBus = false; for (BeanProperty bp : attachmentProvider.getProperties()) { if ("bus".equals(bp.getName())) { foundBus = true; } } if (!foundBus) { attachmentProvider.addProperty("bus", getBusRef(context, "cxf")); } } parseAttributes(element, context, attachmentProvider); parseChildElements(element, context, attachmentProvider); return attachmentProvider; }
public Metadata parse(Element element, ParserContext context) { MutableBeanMetadata attachmentProvider = context.createMetadata(MutableBeanMetadata.class); attachmentProvider.setRuntimeClass(ExternalAttachmentProvider.class); if (hasBusProperty()) { boolean foundBus = false; for (BeanProperty bp : attachmentProvider.getProperties()) { if ("bus".equals(bp.getName())) { foundBus = true; } } if (!foundBus) { attachmentProvider.addProperty("bus", getBusRef(context, "cxf")); } } parseAttributes(element, context, attachmentProvider); parseChildElements(element, context, attachmentProvider); return attachmentProvider; }
if (hasBusProperty()) { boolean foundBus = false; for (BeanProperty bp : cxfBean.getProperties()) { if ("bus".equals(bp.getName())) { foundBus = true;
if (hasBusProperty()) { boolean foundBus = false; for (BeanProperty bp : cxfBean.getProperties()) { if ("bus".equals(bp.getName())) { foundBus = true;
if (hasBusProperty()) { boolean foundBus = false; for (BeanProperty bp : cxfBean.getProperties()) { if ("bus".equals(bp.getName())) { foundBus = true;
if (hasBusProperty()) { boolean foundBus = false; for (BeanProperty bp : cxfBean.getProperties()) { if ("bus".equals(bp.getName())) { foundBus = true;