2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
8 package org.opendaylight.yangtools.concepts;
\r
11 * Utility registration handle. It is a convenience for register-style method
\r
12 * which can return an AutoCloseable realized by a subclass of this class.
\r
13 * Invoking the close() method triggers unregistration of the state the method
\r
16 public abstract class AbstractObjectRegistration<T> extends AbstractRegistration implements Registration<T> {
\r
19 private final T instance;
\r
21 public AbstractObjectRegistration(T instance) {
\r
22 this.instance = instance;
\r
26 public final T getInstance() {
\r