String bindCallback = parseString(component.getName(), element, ATT_BIND, false);
String unbindCallback = parseString(component.getName(), element, ATT_UNBIND, false);
if (component instanceof AtomicImplementationDeclaration) {
if (bindCallback != null) {
CallbackDeclaration callback = new CallbackDeclaration((AtomicImplementationDeclaration) component, bindCallback,true);
if (!callback.isValidInstrumentation()) {
errorHandler.report(Severity.ERROR, component.getName() + " : the specified method \"" + bindCallback + "\" in \"" + ATT_BIND + "\" is invalid or not found");
}
relation.addCallback(RelationDeclaration.Event.BIND, callback);
}
if (unbindCallback != null) {
CallbackDeclaration callback = new CallbackDeclaration((AtomicImplementationDeclaration) component, unbindCallback,true);
if (!callback.isValidInstrumentation()) {
errorHandler.report(Severity.ERROR, component.getName() + " : the specified method \"" + unbindCallback + "\" in \"" + ATT_UNBIND + "\" is invalid or not found");
}
relation.addCallback(RelationDeclaration.Event.UNBIND, callback);
}
}