duke@1: /* ohair@554: * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as ohair@554: * published by the Free Software Foundation. Oracle designates this duke@1: * particular file as subject to the "Classpath" exception as provided ohair@554: * by Oracle in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. duke@1: */ duke@1: duke@1: package com.sun.javadoc; duke@1: duke@1: duke@1: /** duke@1: * Represents an invocation of a generic class or interface. For example, duke@1: * given the generic interface {@code List}, possible invocations duke@1: * include: duke@1: *
duke@1:  *      {@code List}
duke@1:  *      {@code List}
duke@1:  *      {@code List}
duke@1:  * 
duke@1: * A generic inner class {@code Outer.Inner} might be invoked as: duke@1: *
duke@1:  *      {@code Outer.Inner}
duke@1:  * 
duke@1: * duke@1: * @author Scott Seligman duke@1: * @since 1.5 duke@1: */ duke@1: public interface ParameterizedType extends Type { duke@1: duke@1: /** duke@1: * Return the generic class or interface that declared this type. duke@1: * duke@1: * @return the generic class or interface that declared this type. duke@1: */ duke@1: ClassDoc asClassDoc(); duke@1: duke@1: /** duke@1: * Return the actual type arguments of this type. duke@1: * For a generic type that is nested within some other generic type duke@1: * (such as {@code Outer.Inner}), duke@1: * only the type arguments of the innermost type are included. duke@1: * duke@1: * @return the actual type arguments of this type. duke@1: */ duke@1: Type[] typeArguments(); duke@1: duke@1: /** duke@1: * Return the class type that is a direct supertype of this one. duke@1: * This is the superclass of this type's declaring class, duke@1: * with type arguments substituted in. duke@1: * Return null if this is an interface type. duke@1: * duke@1: *

For example, if this parameterized type is duke@1: * {@code java.util.ArrayList}, the result will be duke@1: * {@code java.util.AbstractList}. duke@1: * duke@1: * @return the class type that is a direct supertype of this one. duke@1: */ duke@1: Type superclassType(); duke@1: duke@1: /** duke@1: * Return the interface types directly implemented by or extended by this duke@1: * parameterized type. duke@1: * These are the interfaces directly implemented or extended duke@1: * by this type's declaring class or interface, duke@1: * with type arguments substituted in. duke@1: * Return an empty array if there are no interfaces. duke@1: * duke@1: *

For example, the interface extended by duke@1: * {@code java.util.Set} is {@code java.util.Collection}. duke@1: * duke@1: * @return the interface types directly implemented by or extended by this duke@1: * parameterized type. duke@1: */ duke@1: Type[] interfaceTypes(); duke@1: duke@1: /** duke@1: * Return the type that contains this type as a member. duke@1: * Return null is this is a top-level type. duke@1: * duke@1: *

For example, the containing type of duke@1: * {@code AnInterface.Nested} is the ClassDoc duke@1: * representing {@code AnInterface}, and the containing type of duke@1: * {@code Outer.Inner} is the duke@1: * ParameterizedType representing {@code Outer}. duke@1: * duke@1: * @return the type that contains this type as a member. duke@1: */ duke@1: Type containingType(); duke@1: }