Cleaned up Java Binding code from YANG Tools
[mdsal.git] / binding / yang-binding / src / main / java / org / opendaylight / yangtools / yang / binding / Augmentable.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.binding;
9
10 /**
11  * Augmentable (extensible) object which could carry additional data defined by
12  * third-party extension, without introducing conflict between various
13  * extension.
14  * 
15  * This interface uses extended version of ExtensibleInterface pattern which
16  * also adds marker interface for augmentations (extensions) -
17  * {@link Augmentable}
18  * 
19  * @author Tony Tkacik
20  * @param <T>
21  *            Base class which should implements this interface and is target
22  *            for augmentation.
23  */
24 public interface Augmentable<T> {
25
26     /**
27      * Returns instance of augmentation.
28      * 
29      * @param augmentationType
30      *            Type of augmentation to be returned.
31      * @return instance of augmentation.
32      */
33     <E extends Augmentation<T>> E getAugmentation(Class<E> augmentationType);
34 }