use of org.apache.felix.scr.impl.inject.ModifiedMethod in project felix by apache.
the class ComponentMethodsImpl method initComponentMethods.
public synchronized void initComponentMethods(ComponentMetadata componentMetadata, Class<?> implementationObjectClass) {
if (m_activateMethod != null) {
return;
}
DSVersion dsVersion = componentMetadata.getDSVersion();
boolean configurableServiceProperties = componentMetadata.isConfigurableServiceProperties();
boolean supportsInterfaces = componentMetadata.isConfigureWithInterfaces();
m_activateMethod = new ActivateMethod(componentMetadata.getActivate(), componentMetadata.isActivateDeclared(), implementationObjectClass, dsVersion, configurableServiceProperties, supportsInterfaces);
m_deactivateMethod = new DeactivateMethod(componentMetadata.getDeactivate(), componentMetadata.isDeactivateDeclared(), implementationObjectClass, dsVersion, configurableServiceProperties, supportsInterfaces);
m_modifiedMethod = new ModifiedMethod(componentMetadata.getModified(), implementationObjectClass, dsVersion, configurableServiceProperties, supportsInterfaces);
for (ReferenceMetadata referenceMetadata : componentMetadata.getDependencies()) {
final String refName = referenceMetadata.getName();
final ReferenceMethods methods;
if (referenceMetadata.getField() != null && referenceMetadata.getBind() != null) {
methods = new DuplexReferenceMethods(new FieldMethods(referenceMetadata, implementationObjectClass, dsVersion, configurableServiceProperties), new BindMethods(referenceMetadata, implementationObjectClass, dsVersion, configurableServiceProperties));
} else if (referenceMetadata.getField() != null) {
methods = new FieldMethods(referenceMetadata, implementationObjectClass, dsVersion, configurableServiceProperties);
} else {
methods = new BindMethods(referenceMetadata, implementationObjectClass, dsVersion, configurableServiceProperties);
}
bindMethodMap.put(refName, methods);
}
}
Aggregations