2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.concepts;
10 import com.google.common.annotations.Beta;
11 import java.util.EventListener;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
15 * Implementation of {@link ListenerRegistration} which does nothing in its {@link #close()} method.
17 * @param <T> Type of registered listener
21 public final class NoOpListenerRegistration<T extends EventListener> extends NoOpObjectRegistration<T>
22 implements ListenerRegistration<T> {
23 private NoOpListenerRegistration(final T instance) {
27 public static <T extends EventListener> ListenerRegistration<T> of(final T instance) {
28 return new NoOpListenerRegistration<>(instance);