private Invocation get(final Map<Class, Invocation> map, final Class eventType) { if (eventType == null) { return IGNORE; } final Invocation method = map.get(eventType); if (method != null) { return method; } return get(map, eventType.getSuperclass()); }
private Invocation get(final Map<Class, Invocation> map, final Class eventType) { if (eventType == null) { return IGNORE; } final Invocation method = map.get(eventType); if (method != null) { return method; } return get(map, eventType.getSuperclass()); }
private Invocation buildInvocation(final Phase phase, final Class<?> type) { final InvocationList list = new InvocationList(); for (final Observer observer : observers) { final Invocation method = observer.get(phase, type); if (method != null && method != IGNORE) { list.add(method); } } if (list.getInvocations().size() == 0) { return IGNORE; } else if (list.getInvocations().size() == 1) { return list.getInvocations().get(0); } else { return list; } }
private Invocation buildInvocation(final Phase phase, final Class<?> type) { final InvocationList list = new InvocationList(); for (final Observer observer : observers) { final Invocation method = observer.get(phase, type); if (method != null && method != IGNORE) { list.add(method); } } if (list.getInvocations().size() == 0) { return IGNORE; } else if (list.getInvocations().size() == 1) { return list.getInvocations().get(0); } else { return list; } }
public Invocation get(final Phase event, final Class eventType) { return get(map(event), eventType); }
public Invocation getBefore(final Class eventType) { return get(before, eventType); }
public Invocation get(final Phase event, final Class eventType) { return get(map(event), eventType); }
public Invocation getAfter(final Class eventType) { return get(after, eventType); }
public Invocation getAfter(final Class eventType) { return get(after, eventType); }
public Invocation getBefore(final Class eventType) { return get(before, eventType); }