58c08b0ba56346136651537f9cf38a6087f3ae06
[mdsal.git] / binding2 / mdsal-binding2-generator-api / src / main / java / org / opendaylight / mdsal / binding2 / model / api / ParametrizedType.java
1 /*
2  * Copyright (c) 2016 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
9 package org.opendaylight.mdsal.binding2.model.api;
10
11 import com.google.common.annotations.Beta;
12
13 /**
14  * Represents an instance of simple parametrized type such as List<String>.
15  *
16  * The parametrized Type is designed to be used to store information of Java
17  * Generic Type. The array of {@link #getActualTypeArguments()} holds
18  * information of all generic parameters defined for Parameterized Type.
19  */
20 @Beta
21 public interface ParametrizedType extends Type {
22
23     /**
24      * Returns array of Types that are defined for Parameterized Type.
25      * <br>
26      * (for example if ParameterizedType encapsulates java generic Map that
27      * specifies two parameters Map&lt;K,V&gt; and the K is java.lang.Integer and V
28      * is defined as GeneratedType the array will contain two Types to store
29      * the information of generic parameters.)
30      *
31      * @return array of Types that are defined for Parameterized Type.
32      */
33     Type[] getActualTypeArguments();
34
35     /**
36      * Returns the Raw Type definition of Parameterized Type.
37      *
38      * @return the Raw Type definition of Parameterized Type.
39      */
40     Type getRawType();
41 }