public static int getContainedType(MethodElement me) { EObject container = me.eContainer(); if (container == null) return NONE; if (container instanceof MethodPermission) return METHOD_PERMISSION; if (container instanceof MethodTransaction) return METHOD_TRANSACTION; if (container instanceof ExcludeList) return EXCLUDE_LIST; return NONE; }
public static ExcludeList getExcludeList(MethodElement me) { if (EXCLUDE_LIST == getContainedType(me)) return (ExcludeList) me.eContainer(); return null; }
public static MethodTransaction getMethodTransaction(MethodElement me) { if (METHOD_TRANSACTION == getContainedType(me)) return (MethodTransaction) me.eContainer(); return null; }
public static MethodPermission getMethodPermission(MethodElement me) { if (METHOD_PERMISSION == getContainedType(me)) return (MethodPermission) me.eContainer(); return null; }