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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 22 * CA 95054 USA or visit www.sun.com if you need additional information or 23 * have any questions. 24 */ 25 26 package com.sun.mirror.type; 27 28 29 import java.lang.annotation.Annotation; 30 31 import com.sun.mirror.declaration.Declaration; 32 33 34 /** 35 * Thrown when an application attempts to access the {@link Class} object 36 * corresponding to a {@link TypeMirror}. 37 * 38 * @see MirroredTypesException 39 * @see Declaration#getAnnotation(Class) 40 */ 41 public class MirroredTypeException extends RuntimeException { 42 43 private static final long serialVersionUID = 1; 44 45 private transient TypeMirror type; // cannot be serialized 46 private String name; // type's qualified "name" 47 48 /** 49 * Constructs a new MirroredTypeException for the specified type. 50 * 51 * @param type the type being accessed 52 */ 53 public MirroredTypeException(TypeMirror type) { 54 super("Attempt to access Class object for TypeMirror " + type); 55 this.type = type; 56 name = type.toString(); 57 } 58 59 /** 60 * Returns the type mirror corresponding to the type being accessed. | 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 22 * CA 95054 USA or visit www.sun.com if you need additional information or 23 * have any questions. 24 */ 25 26 package com.sun.mirror.type; 27 28 29 import java.lang.annotation.Annotation; 30 31 import com.sun.mirror.declaration.Declaration; 32 33 34 /** 35 * Thrown when an application attempts to access the {@link Class} object 36 * corresponding to a {@link TypeMirror}. 37 * 38 * @deprecated All components of this API have been superseded by the 39 * standardized annotation processing API. The replacement for the 40 * functionality of this exception is {@link 41 * javax.lang.model.type.MirroredTypeException}. 42 * 43 * @see MirroredTypesException 44 * @see Declaration#getAnnotation(Class) 45 */ 46 @Deprecated 47 @SuppressWarnings("deprecation") 48 public class MirroredTypeException extends RuntimeException { 49 50 private static final long serialVersionUID = 1; 51 52 private transient TypeMirror type; // cannot be serialized 53 private String name; // type's qualified "name" 54 55 /** 56 * Constructs a new MirroredTypeException for the specified type. 57 * 58 * @param type the type being accessed 59 */ 60 public MirroredTypeException(TypeMirror type) { 61 super("Attempt to access Class object for TypeMirror " + type); 62 this.type = type; 63 name = type.toString(); 64 } 65 66 /** 67 * Returns the type mirror corresponding to the type being accessed. |