/*
 * Copyright (c) 2018 Pantheon Technologies, s.r.o. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.yangtools.concepts;

import static java.util.Objects.requireNonNull;

import com.google.common.annotations.Beta;
import org.eclipse.jdt.annotation.NonNullByDefault;

/**
 * Simple base class for classes which wish to implement {@link Delegator} interface and are not otherwise constrained
 * in their class hierarchy.
 *
 * @param <T> Type of delegate
 */
@Beta
@NonNullByDefault
public abstract class AbstractDelegator<T> implements Delegator<T> {
    private final T delegate;

    protected AbstractDelegator(final T delegate) {
        this.delegate = requireNonNull(delegate);
    }

    @Override
    public final T getDelegate() {
        return delegate;
    }
}

@@ -449,16 +449,117 @@
 s.Beta;%0A
+import com.google.common.base.MoreObjects;%0Aimport com.google.common.base.MoreObjects.ToStringHelper;%0A
 import o
@@ -1105,11 +1105,287 @@
 e;%0A    %7D
+%0A%0A    @Override%0A    public final String toString() %7B%0A        return addToString(MoreObjects.toStringHelper(this).omitNullValues()).toString();%0A    %7D%0A%0A    protected ToStringHelper addToString(final ToStringHelper helper) %7B%0A        return helper.add(%22delegate%22, delegate);%0A    %7D
 %0A%7D%0A

Add AbstractDelegator.toString()