1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 using System;
29 
30 
31 namespace uno
32 {
33 /** is used to mark a parameterized UNO entity(i.e. struct)
34     to be an instantiation of a
35     template with the specified type arguments.
36 
37     <p>Currently only UNO structs can have type parameters.</p>
38 
39     <pre>
40 
41     [TypeParameters(new string[]{"T"})]
42     struct Foo {
43       [ParameterizedType("T")]
44       Object member;
45     }
46 
47     public interface XFoo {
48        [return:TypeArguments(new string[]{typeof(char)})]
49        Foo func( [TypeArguments(new string[]{typeof(char)})] Foo f);
50     }
51     </pre>
52 
53     @see TypeParametersAttribute
54     @see ParameterizedTypeAttribute
55  */
56 [AttributeUsage(AttributeTargets.ReturnValue
57                 | AttributeTargets.Parameter
58                 | AttributeTargets.Field, Inherited=false)]
59 public sealed class TypeArgumentsAttribute: System.Attribute
60 {
61     /** initializes an instance with the specified value.
62 
63         @param parameters
64         arrayay of names representing the types.
65         It must not be null.
66      */
67     public TypeArgumentsAttribute(Type[] arguments)
68     {
69         m_arguments = arguments;
70     }
71 
72     public Type[] Arguments
73     {
74         get
75         {
76             return m_arguments;
77         }
78     }
79 
80     private Type[] m_arguments;
81 }
82 
83 }
84 
85