Skip to content
Snippets Groups Projects
Commit f8670410 authored by Johannes Eder's avatar Johannes Eder
Browse files

Added a comment in ObjectAwareServiceBase#getRegisteredHandlers stating that...

Added a comment in ObjectAwareServiceBase#getRegisteredHandlers stating that this method should be changed if the behavior (from AnntotationValueService) is reused in the future.
refs 2270
parent fe629710
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author eder
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 28C98568A98C3761E7E0CE78E81ACB3F
* @ConQAT.Rating YELLOW Hash: B154B43E3C5558AD6232CFE283E59380
*/
public class AnnotationValueService extends
EObjectAwareServiceBase<IAnnotationValueProvider<IAnnotatedSpecification>> implements
......@@ -77,10 +77,6 @@ public class AnnotationValueService extends
* {@link #getRegisteredHandlers(Class)} returns all {@link IAnnotationValueProvider}s that have
* been registered for the given class or any of its super-classes or interfaces.
* </p>
* <p>
* TODO (see #2270) Investigate if this behavior is also (optionally) desirable for other
* services and should be merged to {@link EObjectAwareServiceBase}.
* </p>
*/
@Override
public List<IAnnotationValueProvider<IAnnotatedSpecification>> getRegisteredHandlers(
......
......@@ -60,7 +60,7 @@ import org.osgi.framework.Bundle;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 48B9962B0AD241ED1FF99F1819C92561
* @ConQAT.Rating YELLOW Hash: 55F3E288679439065DA8BF6C2398A690
*/
public abstract class ObjectAwareServiceBase<T extends IObjectAware<? extends Object>> {
......@@ -75,7 +75,14 @@ public abstract class ObjectAwareServiceBase<T extends IObjectAware<? extends Ob
setupHandlerMap();
}
/** Returns the list of registered handlers for the given class. */
/**
* Returns the list of registered handlers for the given class.
*
* IMPORTANT: this method only returns the first registered handler which is found. A different
* implementation where all registered handlers are returned can be found in
* org.fortiss.tooling.base.annotation.AnnotationValueService#getRegisteredHandlers.
* If this behavior will be reused we should change this method. (Refs 2270)
*/
public List<T> getRegisteredHandlers(Class<?> modelElementClass) {
return ReflectionUtils.performNearestClassLookup(modelElementClass, handlerMap);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment