1 /* gnu.classpath.tools.gjdoc.TypeVariableImpl
2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 package gnu
.classpath
.tools
.gjdoc
;
23 import com
.sun
.javadoc
.ProgramElementDoc
;
24 import com
.sun
.javadoc
.Type
;
25 import com
.sun
.javadoc
.TypeVariable
;
27 import java
.util
.List
;
29 public class TypeVariableImpl
31 implements TypeVariable
, WritableType
35 * The bounds of this particular type variable.
40 * The owning program element of this type variable.
42 ProgramElementDoc owner
;
45 * Constructs a new type variable with the supplied name and owner.
47 * @param packageName the name of the package containing the type variable.
48 * @param typeName the name of the type variable.
49 * @param dimension the dimensions of the type variable (always "").
50 * @param owner the owning program element of the type variable.
52 TypeVariableImpl(String packageName
, String typeName
, String dimension
,
53 ProgramElementDoc owner
)
55 super(packageName
, typeName
, dimension
);
60 * Set the bounds to the contents of the supplied list.
62 * @param parsedBounds a list of type bounds.
64 void setBounds(List parsedBounds
)
66 bounds
= (Type
[]) parsedBounds
.toArray(new Type
[parsedBounds
.size()]);
70 * Returns the bounds of this type variable.
72 * @return the bounds of the variable.
74 public Type
[] bounds()
80 * Returns the owning program element for this type variable.
82 * @return the owning program element, whether a class, interface,
83 * constructor or method.
85 public ProgramElementDoc
owner()