01: /* Licensed to the Apache Software Foundation (ASF) under one or more
02: * contributor license agreements. See the NOTICE file distributed with
03: * this work for additional information regarding copyright ownership.
04: * The ASF licenses this file to You under the Apache License, Version 2.0
05: * (the "License"); you may not use this file except in compliance with
06: * the License. You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package java.lang.reflect;
18:
19: /**
20: * Represents a type variable.
21: *
22: * @since 1.5
23: */
24: public interface TypeVariable<D extends GenericDeclaration> extends
25: Type {
26:
27: /**
28: * Answers the upper bounds of the type variable.
29: *
30: * @return array of type variable's upper bounds.
31: * @throws TypeNotPresentException
32: * if the component type points to a missing type.
33: * @throws MalformedParameterizedTypeException
34: * if the component type points to a type that can't be
35: * instantiated for some reason.
36: */
37: Type[] getBounds();
38:
39: /**
40: * Answers a GenericDeclaration object for this type variable.
41: *
42: * @return the generic declaration spec
43: */
44: D getGenericDeclaration();
45:
46: /**
47: * Answers the type variable's name from source.
48: *
49: * @return the variable's name from the source code.
50: */
51: String getName();
52: }
|