1 /* |
|
2 * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle in the LICENSE file that accompanied this code. |
|
10 * |
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
|
15 * accompanied this code). |
|
16 * |
|
17 * You should have received a copy of the GNU General Public License version |
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 * |
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * questions. |
|
24 */ |
|
25 |
|
26 package com.sun.mirror.type; |
|
27 |
|
28 |
|
29 import com.sun.mirror.declaration.Declaration; |
|
30 import com.sun.mirror.util.Types; |
|
31 import com.sun.mirror.util.TypeVisitor; |
|
32 |
|
33 |
|
34 /** |
|
35 * Represents a type in the Java programming language. |
|
36 * Types include primitive types, class and interface types, array |
|
37 * types, and type variables. Wildcard type arguments, and the |
|
38 * pseudo-type representing the type of <tt>void</tt>, are represented |
|
39 * by type mirrors as well. |
|
40 * |
|
41 * <p> Types may be compared using the utility methods in |
|
42 * {@link Types}. |
|
43 * There is no guarantee that any particular type will |
|
44 * always be represented by the same object. |
|
45 * |
|
46 * @deprecated All components of this API have been superseded by the |
|
47 * standardized annotation processing API. The replacement for the |
|
48 * functionality of this interface is {@link |
|
49 * javax.lang.model.type.TypeMirror}. |
|
50 * |
|
51 * @author Joseph D. Darcy |
|
52 * @author Scott Seligman |
|
53 * |
|
54 * @see Declaration |
|
55 * @see Types |
|
56 * @since 1.5 |
|
57 */ |
|
58 @Deprecated |
|
59 @SuppressWarnings("deprecation") |
|
60 public interface TypeMirror { |
|
61 |
|
62 /** |
|
63 * Returns a string representation of this type. |
|
64 * Any names embedded in the expression are qualified. |
|
65 * |
|
66 * @return a string representation of this type |
|
67 */ |
|
68 String toString(); |
|
69 |
|
70 /** |
|
71 * Tests whether two types represent the same type. |
|
72 * |
|
73 * @param obj the object to be compared with this type |
|
74 * @return <tt>true</tt> if the specified object represents the same |
|
75 * type as this. |
|
76 */ |
|
77 boolean equals(Object obj); |
|
78 |
|
79 /** |
|
80 * Applies a visitor to this type. |
|
81 * |
|
82 * @param v the visitor operating on this type |
|
83 */ |
|
84 void accept(TypeVisitor v); |
|
85 } |
|