Search for notifications that match the corresponding notifications realization.

@param type
can be InteractionNotification.class or ElementValueNotification.class
@return
a List with all notifications from the selected type.
779950
@SuppressWarnings("unchecked")
    public ArrayList<Notification> getByType(Class<?> type) {
        List<?> byType = this.getByType();
        if (type.isAssignableFrom(InteractionNotification.class))
            return (ArrayList<Notification>) byType.get(0);
        if (type.isAssignableFrom(ValueNotification.class))
            return (ArrayList<Notification>) byType.get(1);
        return null;
    }
847854
public SearchResponse searchAll(String index, String type) {
        return searchAll(JMArrays.buildArray(index), type);
    }
774262
@Override
	public List<CommerceNotificationAttachment> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
882748
private static List<TypeElement> fetchAllNestedTypes(MessageElement type) {
        List<TypeElement> ret = new ArrayList<TypeElement>();

        List<TypeElement> nestedTypes = type.nestedElements();
        ret.addAll(nestedTypes);
        for (TypeElement t : nestedTypes) {
            if (t instanceof MessageElement) {
                List<TypeElement> subNestedTypes = fetchAllNestedTypes((MessageElement) t);
                ret.addAll(subNestedTypes);
            }
        }
        return ret;
    }
123584
protected function checkIsNotificationAllow($type, NotificationTypeInterface $notificationTypeI)
    {
        $isNotificationAllow = false;

        foreach (static::$typeEventPolitic[$type] as $notificationType) {
            if (is_a($notificationTypeI, $notificationType)) {
                $isNotificationAllow = true;
                break;
            }
        }

        return $isNotificationAllow;
    }
433633
public List<Class<?>> getRawTypes(List<DomainObjectType> types) {
		List<Class<?>> resultList = new ArrayList<Class<?>>();
		for (DomainObjectType type : types) {
			resultList.add(type.getType());
		}
		return resultList;
	}
520078
private function createMessageObject(string $type, string $message): Notification
    {
        $msg = new Notification();

        $msg->setType($type);
        $msg->setMessage($message);

        $this->handler->add($msg);

        return $msg;
    }
744585
@SuppressWarnings("unchecked")
    public <T> List<T> getContextualInstances(final Class<T> type) {
        List<T> result = new ArrayList<T>();
        for (Bean<?> bean : manager.getBeans(type)) {
            CreationalContext<T> context = (CreationalContext<T>) manager.createCreationalContext(bean);
            if (context != null) {
                result.add((T) manager.getReference(bean, type, context));
            }
        }
        return result;
    }
379746
public java.util.Map<String, IdentityNotificationAttributes> getNotificationAttributes() {
        if (notificationAttributes == null) {
            notificationAttributes = new com.amazonaws.internal.SdkInternalMap<String, IdentityNotificationAttributes>();
        }
        return notificationAttributes;
    }
915305
def GetNotifications(self, queue):
    """"""
    queue_shard = self.GetNotificationShard(queue)
    return self._GetUnsortedNotifications(queue_shard).values()
325959
public List<CallbackMetadata> getCallbacks(CallbackType callbackType) {
    return callbacks == null ? null : callbacks.get(callbackType);
  }
745978
function select(state) {
    const {notificationList, visibilityFilter, ...otherStateProperties} = state;
    return {
        //select the notification list from the state
        notificationList: selectNotifications(notificationList, visibilityFilter),
        visibilityFilter,
        ...otherStateProperties
    };
}
1334381
public <T> List<T> getInstances(Class<T> type) {
		return getInstances(Key.get(type));
	}
209401
public Collection<Subscription> getSubscriptionsByMessageType(Class messageType) {
        Set<Subscription> subscriptions = new TreeSet<Subscription>(Subscription.SubscriptionByPriorityDesc);
        ReadLock readLock = readWriteLock.readLock();
        try {
            readLock.lock();

            Subscription subscription;
            ArrayList<Subscription> subsPerMessage = subscriptionsPerMessage.get(messageType);

            if (subsPerMessage != null) {
                subscriptions.addAll(subsPerMessage);
            }

            Class[] types = ReflectionUtils.getSuperTypes(messageType);
            for (int i=0, n=types.length; i<n; i++) {
                Class eventSuperType = types[i];
                
                ArrayList<Subscription> subs = subscriptionsPerMessage.get(eventSuperType);
                if (subs != null) {
                    for (int j = 0,m=subs.size(); j<m; j++) {
                        subscription = subs.get(j);

                        if (subscription.handlesMessageType(messageType)) {
                            subscriptions.add(subscription);
                        }
                    }
                }
            }
        }finally{
            readLock.unlock();
        }
        return subscriptions;
    }
960802
public List<Element> findElements(Class<?> type) {
    List<Element> result = new ArrayList<>();
    LinkedList<Element> stack = new LinkedList<>(this.getChildren());

    if (this.getClass() == type) {
      result.add(this);
    }

    while (!stack.isEmpty()) {
      Element child = stack.pop();
      stack.addAll(0, child.getChildren());
      if (child.getClass() == type) {
        result.add(child);
      }
    }

    return result;
  }
292703
public List<Notification> getBySource(Object source) {
        List<Notification> found = new ArrayList<Notification>();
        for (Notification n: NotificationManager.notifications)
            if (n.getSource().equals(source)) {
                logger.fine("...found a match for getBySource query. With source: "+source);
                found.add(n);
            }
        if(found.size()>0)        
            return found;
        return null;
    }
1322255
public PushedNotifications getFailedNotifications() {
		PushedNotifications filteredList = new PushedNotifications(this);
		for (PushedNotification notification : this) {
			if (!notification.isSuccessful()) {
				filteredList.add(notification);
			}
		}
		return filteredList;
	}