From 108f1e82ae24a2e33ccb82121aafc9aea29caf4a Mon Sep 17 00:00:00 2001 From: Henrik Rentz-Reichert Date: Mon, 18 Jun 2012 16:18:32 +0200 Subject: [core.room] distinguished actor annotations in helpers --- .../org/eclipse/etrice/core/room/util/RoomHelpers.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java index 38a4b1dc7..4ff692177 100644 --- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java +++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java @@ -564,6 +564,10 @@ public class RoomHelpers { return isAnnotationPresent(ac.getAnnotations(), name); } + public static boolean isBehaviorAnnotationPresent(ActorClass ac, String name) { + return isAnnotationPresent(ac.getBehaviorAnnotations(), name); + } + public static boolean isAnnotationPresent(List annotations, String name) { for (Annotation annotation : annotations) { if (annotation.getName().equals(name)) @@ -576,6 +580,10 @@ public class RoomHelpers { return getAttributes(ac.getAnnotations(), name); } + public static List getBehaviorAttributes(ActorClass ac, String name) { + return getAttributes(ac.getBehaviorAnnotations(), name); + } + public static List getAttributes(List annotations, String name) { for (Annotation annotation : annotations) { if (annotation.getName().equals(name)) @@ -588,6 +596,10 @@ public class RoomHelpers { return isAttributePresent(ac.getAnnotations(), name, key); } + public static boolean isBehaviorAttributePresent(ActorClass ac, String name, String key) { + return isAttributePresent(ac.getBehaviorAnnotations(), name, key); + } + public static boolean isAttributePresent(List annotations, String name, String key) { List attributes = getAttributes(annotations, name); for (KeyValue attrib : attributes) { @@ -601,6 +613,10 @@ public class RoomHelpers { return getAttribute(ac.getAnnotations(), name, key); } + public static String getBehaviorAttribute(ActorClass ac, String name, String key) { + return getAttribute(ac.getBehaviorAnnotations(), name, key); + } + public static String getAttribute(List annotations, String name, String key) { List attributes = getAttributes(annotations, name); for (KeyValue attrib : attributes) { -- cgit v1.2.3