Mercurial > hg > icedtea9-forest > langtools
changeset 333:e4ce529b2249
Merge
author | tbell |
---|---|
date | Mon, 27 Jul 2009 23:07:00 -0700 |
parents | 0695e8ebae88 (current diff) 7c2d6da61646 (diff) |
children | 95c1212b07e3 |
files | src/share/classes/com/sun/mirror/apt/package.html src/share/classes/com/sun/mirror/declaration/package.html src/share/classes/com/sun/mirror/type/package.html src/share/classes/com/sun/mirror/util/package.html |
diffstat | 145 files changed, 1050 insertions(+), 280 deletions(-) [+] |
line wrap: on
line diff
--- a/make/build.properties Fri Jul 24 13:40:15 2009 -0700 +++ b/make/build.properties Mon Jul 27 23:07:00 2009 -0700 @@ -60,15 +60,15 @@ bootstrap.full.version = ${bootstrap.release}-${build.number} # options for the <javac> tasks used to compile the tools -javac.source = 5 -javac.target = 5 +javac.source = 7 +javac.target = 7 javac.debug = true javac.debuglevel = source,lines javac.no.jdk.warnings = -XDignore.symbol.file=true # set the following to -version to verify the versions of javac being used javac.version.opt = # in time, there should be no exceptions to -Xlint:all -javac.lint.opts = -Xlint:all -Werror +javac.lint.opts = -Xlint:all,-deprecation -Werror # options for the <javadoc> task for javac javadoc.jls3.url=http://java.sun.com/docs/books/jls/
--- a/src/share/classes/com/sun/mirror/apt/AnnotationProcessor.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/AnnotationProcessor.java Mon Jul 27 23:07:00 2009 -0700 @@ -50,11 +50,17 @@ * annotations of those types. It may freely examine any other program * elements in the course of its processing. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Processor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessor { /**
--- a/src/share/classes/com/sun/mirror/apt/AnnotationProcessorEnvironment.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/AnnotationProcessorEnvironment.java Mon Jul 27 23:07:00 2009 -0700 @@ -48,11 +48,17 @@ * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.ProcessingEnvironment}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessorEnvironment { /** @@ -87,7 +93,6 @@ Filer getFiler(); - /** * Returns the declarations of the types specified when the * annotation processing tool was invoked.
--- a/src/share/classes/com/sun/mirror/apt/AnnotationProcessorFactory.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/AnnotationProcessorFactory.java Mon Jul 27 23:07:00 2009 -0700 @@ -42,11 +42,17 @@ * must provide a public no-argument constructor to be used by tools to * instantiate the factory. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Processor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessorFactory { /**
--- a/src/share/classes/com/sun/mirror/apt/AnnotationProcessorListener.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/AnnotationProcessorListener.java Mon Jul 27 23:07:00 2009 -0700 @@ -28,8 +28,15 @@ /** * Superinterface for all annotation processor event listeners. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. This interface has no + * direct analog in the standardized API because the different round + * model renders it unnecessary. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessorListener extends java.util.EventListener {}
--- a/src/share/classes/com/sun/mirror/apt/AnnotationProcessors.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/AnnotationProcessors.java Mon Jul 27 23:07:00 2009 -0700 @@ -31,10 +31,16 @@ /** * Utilities to create specialized annotation processors. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. There is no direct analog + * of the functionality of this class in the standardized API. + * * @since 1.5 * @author Joseph D. Darcy * @author Scott Seligman */ +@Deprecated +@SuppressWarnings("deprecation") public class AnnotationProcessors { static class NoOpAP implements AnnotationProcessor { NoOpAP() {}
--- a/src/share/classes/com/sun/mirror/apt/Filer.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/Filer.java Mon Jul 27 23:07:00 2009 -0700 @@ -51,11 +51,17 @@ * be deleted. Any subsequent attempt to create the same file during * a run will fail. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Filer}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Filer { /** @@ -140,7 +146,13 @@ /** * Locations (subtrees within the file system) where new files are created. + * + * @deprecated All components of this API have been superseded by + * the standardized annotation processing API. The replacement + * for the functionality of this enum is {@link + * javax.tools.StandardLocation}. */ + @Deprecated enum Location { /** The location of new source files. */ SOURCE_TREE,
--- a/src/share/classes/com/sun/mirror/apt/Messager.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/Messager.java Mon Jul 27 23:07:00 2009 -0700 @@ -25,20 +25,24 @@ package com.sun.mirror.apt; - import com.sun.mirror.util.SourcePosition; - /** * A <tt>Messager</tt> provides the way for * an annotation processor to report error messages, warnings, and * other notices. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Messager}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Messager { /**
--- a/src/share/classes/com/sun/mirror/apt/RoundCompleteEvent.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/RoundCompleteEvent.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,10 +32,17 @@ * cannot meaningfully be serialized because all of the annotation * processing tool's internal state would potentially be needed. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. This class has no direct + * analog in the standardized API because the different round model + * renders it unnecessary. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public abstract class RoundCompleteEvent extends java.util.EventObject { private RoundState rs;
--- a/src/share/classes/com/sun/mirror/apt/RoundCompleteListener.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/RoundCompleteListener.java Mon Jul 27 23:07:00 2009 -0700 @@ -28,10 +28,17 @@ /** * Listener for the completion of a round of annotation processing. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. This interface has no + * direct analog in the standardized API because the different round + * model renders it unnecessary. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public interface RoundCompleteListener extends AnnotationProcessorListener { /** * Invoked after all processors for a round have run to completion.
--- a/src/share/classes/com/sun/mirror/apt/RoundState.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/apt/RoundState.java Mon Jul 27 23:07:00 2009 -0700 @@ -28,10 +28,17 @@ /** * Represents the status of a completed round of annotation processing. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.RoundEnvironment}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public interface RoundState { /** * Returns <tt>true</tt> if this was the last round of annotation
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/classes/com/sun/mirror/apt/package-info.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,38 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Classes used to communicate information between {@linkplain + * com.sun.mirror.apt.AnnotationProcessor annotation processors} and + * an annotation processing tool. + * + * <p>The {@code apt} tool and its associated API have been superseded + * by the standardized annotation processing API. The replacement for + * the functionality in this package is {@link + * javax.annotation.processing}. + * + * @since 1.5 + */ +package com.sun.mirror.apt;
--- a/src/share/classes/com/sun/mirror/apt/package.html Fri Jul 24 13:40:15 2009 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- - -Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Sun designates this -particular file as subject to the "Classpath" exception as provided -by Sun in the LICENSE file that accompanied this code. - -This code is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -CA 95054 USA or visit www.sun.com if you need additional information or -have any questions. ---> - -</head> -<body bgcolor="white"> - -Classes used to communicate information between -{@linkplain com.sun.mirror.apt.AnnotationProcessor annotation processors} -and an annotation processing tool. - -<p>Note that the <code>apt</code> tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 -</body> -</html>
--- a/src/share/classes/com/sun/mirror/declaration/AnnotationMirror.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/AnnotationMirror.java Mon Jul 27 23:07:00 2009 -0700 @@ -38,11 +38,17 @@ * ("<tt>==</tt>"). There is no guarantee that any particular * annotation will always be represented by the same object. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.AnnotationMirror}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationMirror { /**
--- a/src/share/classes/com/sun/mirror/declaration/AnnotationTypeDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/AnnotationTypeDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,17 @@ /** * Represents the declaration of an annotation type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationTypeDeclaration extends InterfaceDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/AnnotationTypeElementDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/AnnotationTypeElementDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -29,11 +29,17 @@ /** * Represents an element of an annotation type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joe Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationTypeElementDeclaration extends MethodDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/AnnotationValue.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/AnnotationValue.java Mon Jul 27 23:07:00 2009 -0700 @@ -30,11 +30,17 @@ /** * Represents a value of an annotation type element. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.AnnotationValue}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationValue { /**
--- a/src/share/classes/com/sun/mirror/declaration/ClassDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/ClassDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -46,13 +46,19 @@ * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * * @see ClassType * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ClassDeclaration extends TypeDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/ConstructorDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/ConstructorDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -29,10 +29,16 @@ /** * Represents a constructor of a class or interface. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joe Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ConstructorDeclaration extends ExecutableDeclaration { }
--- a/src/share/classes/com/sun/mirror/declaration/Declaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/Declaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -44,6 +44,11 @@ * method. There is no guarantee that any particular declaration will * always be represented by the same object. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.Element}. + * * @author Joseph D. Darcy * @author Scott Seligman * @@ -51,7 +56,8 @@ * @see TypeMirror * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Declaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/EnumConstantDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/EnumConstantDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -29,11 +29,17 @@ /** * Represents an enum constant declaration. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.VariableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface EnumConstantDeclaration extends FieldDeclaration { /** * {@inheritDoc}
--- a/src/share/classes/com/sun/mirror/declaration/EnumDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/EnumDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,17 @@ /** * Represents the declaration of an enum type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface EnumDeclaration extends ClassDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/ExecutableDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/ExecutableDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -34,11 +34,17 @@ /** * Represents a method or constructor of a class or interface. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ExecutableDeclaration extends MemberDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/FieldDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/FieldDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,17 @@ /** * Represents a field of a type declaration. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.VariableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface FieldDeclaration extends MemberDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/InterfaceDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/InterfaceDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,12 +40,18 @@ * represents an interface <i>type</i>. * See {@link TypeDeclaration} for more on this distinction. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * * @see InterfaceType * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface InterfaceDeclaration extends TypeDeclaration { }
--- a/src/share/classes/com/sun/mirror/declaration/MemberDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/MemberDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -31,11 +31,17 @@ * type. This includes fields, constructors, methods, and (since they * may be nested) declared types themselves. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.Element}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface MemberDeclaration extends Declaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/MethodDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/MethodDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,11 +36,17 @@ * {@linkplain AnnotationTypeElementDeclaration annotation type element} * is a kind of method. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface MethodDeclaration extends ExecutableDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/Modifier.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/Modifier.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,11 +35,16 @@ * then it is customary, though not required, that they appear in the same * order as the constants listed in the detail section below. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this enum is {@link javax.lang.model.element.Modifier}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public enum Modifier { // See JLS2 sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1.
--- a/src/share/classes/com/sun/mirror/declaration/PackageDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/PackageDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -37,11 +37,17 @@ * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.PackageElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface PackageDeclaration extends Declaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/ParameterDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/ParameterDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,17 @@ /** * Represents a formal parameter of a method or constructor. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.VariableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ParameterDeclaration extends Declaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/TypeDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/TypeDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -54,13 +54,19 @@ * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * * @see DeclaredType * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeDeclaration extends MemberDeclaration { /**
--- a/src/share/classes/com/sun/mirror/declaration/TypeParameterDeclaration.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/declaration/TypeParameterDeclaration.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,11 +36,17 @@ * or constructor declaration. * A type parameter declares a {@link TypeVariable}. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.TypeParameterElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeParameterDeclaration extends Declaration { /**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/classes/com/sun/mirror/declaration/package-info.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,40 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Interfaces used to model program element declarations. A + * declaration is represented by the appropriate subinterface of + * {@link com.sun.mirror.declaration.Declaration}, and an annotation + * is represented as an {@link + * com.sun.mirror.declaration.AnnotationMirror}. + * + * <p>The {@code apt} tool and its associated API have been superseded + * by the standardized annotation processing API. The replacement for + * the functionality in this package is {@link + * javax.lang.model.element}. + * + * @since 1.5 + */ +package com.sun.mirror.declaration;
--- a/src/share/classes/com/sun/mirror/declaration/package.html Fri Jul 24 13:40:15 2009 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- - -Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Sun designates this -particular file as subject to the "Classpath" exception as provided -by Sun in the LICENSE file that accompanied this code. - -This code is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -CA 95054 USA or visit www.sun.com if you need additional information or -have any questions. ---> - -</head> -<body bgcolor="white"> - -Interfaces used to model program element declarations. -A declaration is represented by the appropriate subinterface of -{@link com.sun.mirror.declaration.Declaration}, -and an annotation is represented as an -{@link com.sun.mirror.declaration.AnnotationMirror}. - -<p>Note that the <code>apt</code> tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 -</body> -</html>
--- a/src/share/classes/com/sun/mirror/type/AnnotationType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/AnnotationType.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,17 @@ /** * Represents an annotation type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationType extends InterfaceType { /**
--- a/src/share/classes/com/sun/mirror/type/ArrayType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/ArrayType.java Mon Jul 27 23:07:00 2009 -0700 @@ -31,11 +31,17 @@ * A multidimensional array type is represented as an array type * whose component type is also an array type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.ArrayType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ArrayType extends ReferenceType { /**
--- a/src/share/classes/com/sun/mirror/type/ClassType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/ClassType.java Mon Jul 27 23:07:00 2009 -0700 @@ -38,11 +38,17 @@ * of a class, a <tt>ClassType</tt> represents a class <i>type</i>. * See {@link TypeDeclaration} for more on this distinction. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ClassType extends DeclaredType { /**
--- a/src/share/classes/com/sun/mirror/type/DeclaredType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/DeclaredType.java Mon Jul 27 23:07:00 2009 -0700 @@ -48,11 +48,17 @@ * Other method invocations on such an unknown type will not, in general, * return meaningful results. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface DeclaredType extends ReferenceType { /**
--- a/src/share/classes/com/sun/mirror/type/EnumType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/EnumType.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,17 @@ /** * Represents an enum type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface EnumType extends ClassType { /**
--- a/src/share/classes/com/sun/mirror/type/InterfaceType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/InterfaceType.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,11 +39,17 @@ * represents an interface <i>type</i>. * See {@link TypeDeclaration} for more on this distinction. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface InterfaceType extends DeclaredType { /**
--- a/src/share/classes/com/sun/mirror/type/MirroredTypeException.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/MirroredTypeException.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,9 +35,16 @@ * Thrown when an application attempts to access the {@link Class} object * corresponding to a {@link TypeMirror}. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this exception is {@link + * javax.lang.model.type.MirroredTypeException}. + * * @see MirroredTypesException * @see Declaration#getAnnotation(Class) */ +@Deprecated +@SuppressWarnings("deprecation") public class MirroredTypeException extends RuntimeException { private static final long serialVersionUID = 1;
--- a/src/share/classes/com/sun/mirror/type/MirroredTypesException.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/MirroredTypesException.java Mon Jul 27 23:07:00 2009 -0700 @@ -38,9 +38,16 @@ * Thrown when an application attempts to access a sequence of {@link Class} * objects each corresponding to a {@link TypeMirror}. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this exception is {@link + * javax.lang.model.type.MirroredTypesException}. + * * @see MirroredTypeException * @see Declaration#getAnnotation(Class) */ +@Deprecated +@SuppressWarnings("deprecation") public class MirroredTypesException extends RuntimeException { private static final long serialVersionUID = 1;
--- a/src/share/classes/com/sun/mirror/type/PrimitiveType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/PrimitiveType.java Mon Jul 27 23:07:00 2009 -0700 @@ -31,11 +31,17 @@ * <tt>boolean</tt>, <tt>byte</tt>, <tt>short</tt>, <tt>int</tt>, * <tt>long</tt>, <tt>char</tt>, <tt>float</tt>, and <tt>double</tt>. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.PrimitiveType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface PrimitiveType extends TypeMirror { /** @@ -47,7 +53,13 @@ /** * An enumeration of the different kinds of primitive types. + * + * @deprecated All components of this API have been superseded by + * the standardized annotation processing API. The replacement + * for the functionality of this enum is {@link + * javax.lang.model.type.TypeKind}. */ + @Deprecated enum Kind { /** The primitive type <tt>boolean</tt> */ BOOLEAN, /** The primitive type <tt>byte</tt> */ BYTE,
--- a/src/share/classes/com/sun/mirror/type/ReferenceType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/ReferenceType.java Mon Jul 27 23:07:00 2009 -0700 @@ -30,10 +30,16 @@ * Represents a reference type. * These include class and interface types, array types, and type variables. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.ReferenceType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ReferenceType extends TypeMirror { }
--- a/src/share/classes/com/sun/mirror/type/TypeMirror.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/TypeMirror.java Mon Jul 27 23:07:00 2009 -0700 @@ -43,6 +43,11 @@ * There is no guarantee that any particular type will * always be represented by the same object. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.TypeMirror}. + * * @author Joseph D. Darcy * @author Scott Seligman * @@ -50,7 +55,8 @@ * @see Types * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeMirror { /**
--- a/src/share/classes/com/sun/mirror/type/TypeVariable.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/TypeVariable.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,11 +35,17 @@ * {@linkplain TypeParameterDeclaration type parameter} of a * type, method, or constructor. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.TypeVariable}. + * * @author Joe Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeVariable extends ReferenceType { /**
--- a/src/share/classes/com/sun/mirror/type/VoidType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/VoidType.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,9 +35,15 @@ * @author Joseph D. Darcy * @author Scott Seligman * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.NoType}. + * * @see MethodDeclaration#getReturnType() * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface VoidType extends TypeMirror { }
--- a/src/share/classes/com/sun/mirror/type/WildcardType.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/type/WildcardType.java Mon Jul 27 23:07:00 2009 -0700 @@ -41,11 +41,17 @@ * <tt>extends</tt> clause, its lower bound explicitly set by a * <tt>super</tt> clause, or neither (but not both). * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.WildcardType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface WildcardType extends TypeMirror { /**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/classes/com/sun/mirror/type/package-info.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,37 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Interfaces used to model types. A type is represented by the + * appropriate subinterface of {@link com.sun.mirror.type.TypeMirror}. + * + * <p>The {@code apt} tool and its associated API have been + * superseded by the standardized annotation processing API. The + * replacement for the functionality in this package is {@link + * javax.lang.model.type}. + * + * @since 1.5 + */ +package com.sun.mirror.type;
--- a/src/share/classes/com/sun/mirror/type/package.html Fri Jul 24 13:40:15 2009 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- - -Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Sun designates this -particular file as subject to the "Classpath" exception as provided -by Sun in the LICENSE file that accompanied this code. - -This code is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -CA 95054 USA or visit www.sun.com if you need additional information or -have any questions. ---> - -</head> -<body bgcolor="white"> - -Interfaces used to model types. -A type is represented by the appropriate subinterface of -{@link com.sun.mirror.type.TypeMirror}. - -<p>Note that the <code>apt</code> tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 -</body> -</html>
--- a/src/share/classes/com/sun/mirror/util/DeclarationFilter.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/DeclarationFilter.java Mon Jul 27 23:07:00 2009 -0700 @@ -69,11 +69,17 @@ * }; * result = nameFilter.filter(decls); </pre></blockquote> * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.ElementFilter}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public class DeclarationFilter { // Predefined filters for convenience.
--- a/src/share/classes/com/sun/mirror/util/DeclarationScanner.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/DeclarationScanner.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,11 +39,17 @@ * are scanned; the postprocessing visitor is called after the * contained declarations are scanned. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.ElementScanner6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") class DeclarationScanner implements DeclarationVisitor { protected DeclarationVisitor pre; protected DeclarationVisitor post;
--- a/src/share/classes/com/sun/mirror/util/DeclarationVisitor.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/DeclarationVisitor.java Mon Jul 27 23:07:00 2009 -0700 @@ -37,11 +37,17 @@ * <tt>visit<i>Xxx</i></tt> method applicable to that declaration is * invoked. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.ElementVisitor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface DeclarationVisitor { /**
--- a/src/share/classes/com/sun/mirror/util/DeclarationVisitors.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/DeclarationVisitors.java Mon Jul 27 23:07:00 2009 -0700 @@ -28,10 +28,17 @@ /** * Utilities to create specialized <tt>DeclarationVisitor</tt> instances. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. There is no direct + * replacement for the functionality of this class in the standardized + * API due to that API's different visitor structure. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public class DeclarationVisitors { private DeclarationVisitors(){} // do not instantiate.
--- a/src/share/classes/com/sun/mirror/util/Declarations.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/Declarations.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,17 @@ /** * Utility methods for operating on declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.util.Elements}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Declarations { /**
--- a/src/share/classes/com/sun/mirror/util/SimpleDeclarationVisitor.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/SimpleDeclarationVisitor.java Mon Jul 27 23:07:00 2009 -0700 @@ -37,11 +37,17 @@ * methods that correspond to the kinds of declarations on which it * will operate. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.SimpleElementVisitor6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public class SimpleDeclarationVisitor implements DeclarationVisitor { /**
--- a/src/share/classes/com/sun/mirror/util/SimpleTypeVisitor.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/SimpleTypeVisitor.java Mon Jul 27 23:07:00 2009 -0700 @@ -37,11 +37,17 @@ * methods that correspond to the kinds of types on which it will * operate. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.SimpleTypeVisitor6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public class SimpleTypeVisitor implements TypeVisitor { /**
--- a/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java Mon Jul 27 23:07:00 2009 -0700 @@ -42,10 +42,17 @@ * are scanned; the postprocessing visitor is called after the * contained declarations are scanned. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.SimpleElementVisitor6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") class SourceOrderDeclScanner extends DeclarationScanner { static class SourceOrderComparator implements java.util.Comparator<Declaration> { SourceOrderComparator(){}
--- a/src/share/classes/com/sun/mirror/util/SourcePosition.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/SourcePosition.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,11 +32,20 @@ /** * Represents a position in a source file. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. There is no direct + * replacement for the functionality of this interface since the + * standardized {@link javax.annotation.processing.Messager Messager} + * API implicitly takes a source position argument via any element, + * annotation mirror, or annotation value passed along with the + * message. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface SourcePosition { /**
--- a/src/share/classes/com/sun/mirror/util/TypeVisitor.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/TypeVisitor.java Mon Jul 27 23:07:00 2009 -0700 @@ -38,11 +38,17 @@ * the most specific <tt>visit<i>Xxx</i></tt> method applicable to * that type is invoked. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.TypeVisitor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeVisitor { /**
--- a/src/share/classes/com/sun/mirror/util/Types.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/mirror/util/Types.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,11 +35,17 @@ /** * Utility methods for operating on types. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.util.Types}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Types { /**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/classes/com/sun/mirror/util/package-info.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,37 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Utilities to assist in the processing of {@linkplain + * com.sun.mirror.declaration declarations} and {@linkplain + * com.sun.mirror.type types}. + * + * <p>The {@code apt} tool and its associated API have been superseded + * by the standardized annotation processing API. The replacement for + * the functionality in this package is {@link javax.lang.model.util}. + * + * @since 1.5 + */ +package com.sun.mirror.util;
--- a/src/share/classes/com/sun/mirror/util/package.html Fri Jul 24 13:40:15 2009 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- - -Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Sun designates this -particular file as subject to the "Classpath" exception as provided -by Sun in the LICENSE file that accompanied this code. - -This code is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -CA 95054 USA or visit www.sun.com if you need additional information or -have any questions. ---> - -</head> -<body bgcolor="white"> - -Utilities to assist in the processing of {@linkplain -com.sun.mirror.declaration declarations} and {@linkplain -com.sun.mirror.type types}. - -<p>Note that the <code>apt</code> tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 -</body> -</html>
--- a/src/share/classes/com/sun/tools/apt/comp/Apt.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/comp/Apt.java Mon Jul 27 23:07:00 2009 -0700 @@ -65,6 +65,7 @@ * risk. This code and its internal interfaces are subject to change * or deletion without notice.</b> */ +@SuppressWarnings("deprecation") public class Apt extends ListBuffer<Env<AttrContext>> { java.util.Set<String> genSourceFileNames = new java.util.LinkedHashSet<String>(); public java.util.Set<String> getSourceFileNames() {
--- a/src/share/classes/com/sun/tools/apt/comp/BootstrapAPF.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/comp/BootstrapAPF.java Mon Jul 27 23:07:00 2009 -0700 @@ -29,6 +29,7 @@ import com.sun.mirror.apt.*; import com.sun.mirror.declaration.AnnotationTypeDeclaration; +@SuppressWarnings("deprecation") public class BootstrapAPF implements AnnotationProcessorFactory { static final Collection<String> supportedOptions =
--- a/src/share/classes/com/sun/tools/apt/comp/PrintAP.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/comp/PrintAP.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,6 +36,7 @@ /** * Class used to implement "-print" option. */ +@SuppressWarnings("deprecation") public class PrintAP implements AnnotationProcessor {
--- a/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java Mon Jul 27 23:07:00 2009 -0700 @@ -50,6 +50,7 @@ * risk. This code and its internal interfaces are subject to change * or deletion without notice.</b> */ +@SuppressWarnings("deprecation") public class JavaCompiler extends com.sun.tools.javac.main.JavaCompiler { /** The context key for the compiler. */ protected static final Context.Key<JavaCompiler> compilerKey =
--- a/src/share/classes/com/sun/tools/apt/main/Main.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/main/Main.java Mon Jul 27 23:07:00 2009 -0700 @@ -64,6 +64,7 @@ * risk. This code and its internal interfaces are subject to change * or deletion without notice.</b> */ +@SuppressWarnings("deprecation") public class Main { /** For testing: enter any options you want to be set implicitly @@ -780,7 +781,6 @@ // prefixed to command line arguments. processArgs(forcedOpts); - /* * A run of apt only gets passed the most recently generated * files; the initial run of apt gets passed the files from @@ -792,6 +792,11 @@ // assign args the result of parse to capture results of // '@file' expansion origFilenames = processArgs((args=CommandLine.parse(args))); + + if (options.get("suppress-tool-api-removal-message") == null) { + Bark.printLines(out, getLocalizedString("misc.Deprecation")); + } + if (origFilenames == null) { return EXIT_CMDERR; } else if (origFilenames.size() == 0) {
--- a/src/share/classes/com/sun/tools/apt/mirror/AptEnv.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/AptEnv.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,7 +39,7 @@ /** * The environment for a run of apt. */ - +@SuppressWarnings("deprecation") public class AptEnv { public Names names; // javac's name table
--- a/src/share/classes/com/sun/tools/apt/mirror/apt/AnnotationProcessorEnvironmentImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/apt/AnnotationProcessorEnvironmentImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -47,6 +47,7 @@ /* * Annotation Processor Environment implementation. */ +@SuppressWarnings("deprecation") public class AnnotationProcessorEnvironmentImpl implements AnnotationProcessorEnvironment { Collection<TypeDeclaration> spectypedecls;
--- a/src/share/classes/com/sun/tools/apt/mirror/apt/FilerImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/apt/FilerImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -45,7 +45,7 @@ /** * Implementation of Filer. */ - +@SuppressWarnings("deprecation") public class FilerImpl implements Filer { /* * The Filer class must maintain a number of constraints. First,
--- a/src/share/classes/com/sun/tools/apt/mirror/apt/MessagerImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/apt/MessagerImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -38,7 +38,7 @@ /** * Implementation of Messager. */ - +@SuppressWarnings("deprecation") public class MessagerImpl implements Messager { private final Bark bark;
--- a/src/share/classes/com/sun/tools/apt/mirror/apt/RoundCompleteEventImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/apt/RoundCompleteEventImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -29,6 +29,7 @@ import com.sun.mirror.apt.RoundCompleteEvent; import com.sun.mirror.apt.RoundState; +@SuppressWarnings("deprecation") public class RoundCompleteEventImpl extends RoundCompleteEvent { private static final long serialVersionUID = 7067621446720784300L;
--- a/src/share/classes/com/sun/tools/apt/mirror/apt/RoundStateImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/apt/RoundStateImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -28,6 +28,7 @@ import com.sun.mirror.apt.RoundState; import java.util.Map; +@SuppressWarnings("deprecation") public class RoundStateImpl implements RoundState { private final boolean finalRound; private final boolean errorRaised;
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -42,7 +42,7 @@ /** * Implementation of AnnotationMirror */ - +@SuppressWarnings("deprecation") public class AnnotationMirrorImpl implements AnnotationMirror { protected final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java Mon Jul 27 23:07:00 2009 -0700 @@ -49,7 +49,7 @@ * <p> The "dynamic proxy return form" of an attribute element value is * the form used by sun.reflect.annotation.AnnotationInvocationHandler. */ - +@SuppressWarnings("deprecation") class AnnotationProxyMaker { private final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -37,7 +37,7 @@ /** * Implementation of AnnotationTypeDeclaration */ - +@SuppressWarnings("deprecation") public class AnnotationTypeDeclarationImpl extends InterfaceDeclarationImpl implements AnnotationTypeDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeElementDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeElementDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,7 +35,7 @@ /** * Implementation of AnnotationTypeElementDeclaration */ - +@SuppressWarnings("deprecation") public class AnnotationTypeElementDeclarationImpl extends MethodDeclarationImpl implements AnnotationTypeElementDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationValueImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationValueImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,7 +40,7 @@ /** * Implementation of AnnotationValue */ - +@SuppressWarnings("deprecation") public class AnnotationValueImpl implements AnnotationValue { protected final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/ClassDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/ClassDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -42,7 +42,7 @@ /** * Implementation of ClassDeclaration */ - +@SuppressWarnings("deprecation") public class ClassDeclarationImpl extends TypeDeclarationImpl implements ClassDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,6 +39,7 @@ /** * Utility class for operating on constant expressions. */ +@SuppressWarnings("deprecation") class Constants { /**
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/ConstructorDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/ConstructorDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,7 +39,7 @@ /** * Implementation of ConstructorDeclaration */ - +@SuppressWarnings("deprecation") public class ConstructorDeclarationImpl extends ExecutableDeclarationImpl implements ConstructorDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -52,7 +52,7 @@ /** * Implementation of Declaration */ - +@SuppressWarnings("deprecation") public abstract class DeclarationImpl implements Declaration { protected final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationMaker.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationMaker.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,7 +40,7 @@ /** * Utilities for constructing and caching declarations. */ - +@SuppressWarnings("deprecation") public class DeclarationMaker { private AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumConstantDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumConstantDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,7 +35,7 @@ /** * Implementation of EnumConstantDeclaration */ - +@SuppressWarnings("deprecation") public class EnumConstantDeclarationImpl extends FieldDeclarationImpl implements EnumConstantDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -37,7 +37,7 @@ /** * Implementation of EnumDeclaration */ - +@SuppressWarnings("deprecation") public class EnumDeclarationImpl extends ClassDeclarationImpl implements EnumDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/ExecutableDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/ExecutableDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,7 +39,7 @@ /** * Implementation of ExecutableDeclaration */ - +@SuppressWarnings("deprecation") public abstract class ExecutableDeclarationImpl extends MemberDeclarationImpl implements ExecutableDeclaration { public MethodSymbol sym;
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/FieldDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/FieldDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,7 +40,7 @@ /** * Implementation of FieldDeclaration */ - +@SuppressWarnings("deprecation") class FieldDeclarationImpl extends MemberDeclarationImpl implements FieldDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/InterfaceDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/InterfaceDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,7 +35,7 @@ /** * Implementation of InterfaceDeclaration */ - +@SuppressWarnings("deprecation") public class InterfaceDeclarationImpl extends TypeDeclarationImpl implements InterfaceDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/MemberDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/MemberDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,7 +40,7 @@ /** * Implementation of MemberDeclaration */ - +@SuppressWarnings("deprecation") public abstract class MemberDeclarationImpl extends DeclarationImpl implements MemberDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/MethodDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/MethodDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,7 +36,7 @@ /** * Implementation of MethodDeclaration */ - +@SuppressWarnings("deprecation") public class MethodDeclarationImpl extends ExecutableDeclarationImpl implements MethodDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/PackageDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/PackageDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,7 +39,7 @@ /** * Implementation of PackageDeclaration. */ - +@SuppressWarnings("deprecation") public class PackageDeclarationImpl extends DeclarationImpl implements PackageDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/ParameterDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/ParameterDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,7 +39,7 @@ /** * Implementation of ParameterDeclaration */ - +@SuppressWarnings("deprecation") public class ParameterDeclarationImpl extends DeclarationImpl implements ParameterDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,7 +40,7 @@ /** * Implementation of TypeDeclaration */ - +@SuppressWarnings("deprecation") public class TypeDeclarationImpl extends MemberDeclarationImpl implements TypeDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,7 +40,7 @@ /** * Implementation of TypeParameterDeclaration */ - +@SuppressWarnings("deprecation") public class TypeParameterDeclarationImpl extends DeclarationImpl implements TypeParameterDeclaration {
--- a/src/share/classes/com/sun/tools/apt/mirror/type/AnnotationTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/AnnotationTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,7 +36,7 @@ /** * Implementation of AnnotationType */ - +@SuppressWarnings("deprecation") public class AnnotationTypeImpl extends InterfaceTypeImpl implements AnnotationType {
--- a/src/share/classes/com/sun/tools/apt/mirror/type/ArrayTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/ArrayTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,7 +35,7 @@ /** * Implementation of ArrayType */ - +@SuppressWarnings("deprecation") public class ArrayTypeImpl extends TypeMirrorImpl implements ArrayType { protected Type.ArrayType type;
--- a/src/share/classes/com/sun/tools/apt/mirror/type/ClassTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/ClassTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,7 +36,7 @@ /** * Implementation of ClassType */ - +@SuppressWarnings("deprecation") public class ClassTypeImpl extends DeclaredTypeImpl implements ClassType { ClassTypeImpl(AptEnv env, Type.ClassType type) {
--- a/src/share/classes/com/sun/tools/apt/mirror/type/DeclaredTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/DeclaredTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -38,7 +38,7 @@ /** * Implementation of DeclaredType */ - +@SuppressWarnings("deprecation") abstract class DeclaredTypeImpl extends TypeMirrorImpl implements DeclaredType {
--- a/src/share/classes/com/sun/tools/apt/mirror/type/EnumTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/EnumTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,7 +36,7 @@ /** * Implementation of EnumType */ - +@SuppressWarnings("deprecation") public class EnumTypeImpl extends ClassTypeImpl implements EnumType { EnumTypeImpl(AptEnv env, Type.ClassType type) {
--- a/src/share/classes/com/sun/tools/apt/mirror/type/InterfaceTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/InterfaceTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,7 +36,7 @@ /** * Implementation of InterfaceType */ - +@SuppressWarnings("deprecation") public class InterfaceTypeImpl extends DeclaredTypeImpl implements InterfaceType {
--- a/src/share/classes/com/sun/tools/apt/mirror/type/PrimitiveTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/PrimitiveTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -38,7 +38,7 @@ /** * Implementation of PrimitiveType. */ - +@SuppressWarnings("deprecation") class PrimitiveTypeImpl extends TypeMirrorImpl implements PrimitiveType { private final Kind kind; // the kind of primitive
--- a/src/share/classes/com/sun/tools/apt/mirror/type/TypeMaker.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/TypeMaker.java Mon Jul 27 23:07:00 2009 -0700 @@ -41,7 +41,7 @@ /** * Utilities for constructing type objects. */ - +@SuppressWarnings("deprecation") public class TypeMaker { private final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,7 +35,7 @@ /** * Implementation of TypeMirror */ - +@SuppressWarnings("deprecation") public abstract class TypeMirrorImpl implements TypeMirror { protected final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/type/TypeVariableImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/TypeVariableImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,7 +40,7 @@ /** * Implementation of TypeVariable */ - +@SuppressWarnings("deprecation") public class TypeVariableImpl extends TypeMirrorImpl implements TypeVariable { protected Type.TypeVar type;
--- a/src/share/classes/com/sun/tools/apt/mirror/type/VoidTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/VoidTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -34,7 +34,7 @@ /** * Implementation of VoidType. */ - +@SuppressWarnings("deprecation") class VoidTypeImpl extends TypeMirrorImpl implements VoidType { VoidTypeImpl(AptEnv env) {
--- a/src/share/classes/com/sun/tools/apt/mirror/type/WildcardTypeImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/type/WildcardTypeImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -41,7 +41,7 @@ /** * Implementation of WildcardType */ - +@SuppressWarnings("deprecation") public class WildcardTypeImpl extends TypeMirrorImpl implements WildcardType { protected Type.WildcardType type;
--- a/src/share/classes/com/sun/tools/apt/mirror/util/DeclarationsImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/util/DeclarationsImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -42,7 +42,7 @@ /** * Implementation of Declarations utility methods for annotation processors */ - +@SuppressWarnings("deprecation") public class DeclarationsImpl implements Declarations { private final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/mirror/util/SourcePositionImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/util/SourcePositionImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,7 +36,7 @@ /** * Implementation of SourcePosition */ - +@SuppressWarnings("deprecation") public class SourcePositionImpl implements SourcePosition { private JavaFileObject sourcefile;
--- a/src/share/classes/com/sun/tools/apt/mirror/util/TypesImpl.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/util/TypesImpl.java Mon Jul 27 23:07:00 2009 -0700 @@ -44,7 +44,7 @@ /** * Implementation of Types utility methods for annotation processors */ - +@SuppressWarnings("deprecation") public class TypesImpl implements Types { private final AptEnv env;
--- a/src/share/classes/com/sun/tools/apt/resources/apt.properties Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/apt/resources/apt.properties Mon Jul 27 23:07:00 2009 -0700 @@ -111,6 +111,14 @@ ## miscellaneous strings ## +apt.misc.Deprecation=\ + \nwarning:\u0020The apt tool and its associated API are planned to be\n\ + removed in the next major JDK release. These features have been\n\ + superseded by javac and the standardized annotation processing API,\n\ + javax.annotation.processing and javax.lang.model. Users are\n\ + recommended to migrate to the annotation processing features of\n\ + javac; see the javac man page for more information.\n + apt.misc.Problem=\ Problem encountered during annotation processing; \nsee stacktrace below for more information.
--- a/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java Mon Jul 27 23:07:00 2009 -0700 @@ -357,6 +357,7 @@ sb.append(type_index); break; case CLASS_LITERAL: + case CLASS_LITERAL_GENERIC_OR_ARRAY: sb.append(", offset = "); sb.append(offset); break;
--- a/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,6 +32,11 @@ /** * Provides simple functionalities for javac diagnostic formatting. * @param <D> type of diagnostic handled by this formatter + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public interface DiagnosticFormatter<D extends Diagnostic<?>> {
--- a/src/share/classes/com/sun/tools/javac/api/Formattable.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/api/Formattable.java Mon Jul 27 23:07:00 2009 -0700 @@ -31,6 +31,11 @@ * This interface must be implemented by any javac class that has non-trivial * formatting needs (e.g. where toString() does not apply because of localization). * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + * * @author Maurizio Cimadamore */ public interface Formattable {
--- a/src/share/classes/com/sun/tools/javac/api/Messages.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/api/Messages.java Mon Jul 27 23:07:00 2009 -0700 @@ -32,6 +32,11 @@ * This interface defines the minimum requirements in order to provide support * for localized formatted strings. * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + * * @author Maurizio Cimadamore */ public interface Messages {
--- a/src/share/classes/com/sun/tools/javac/code/BoundKind.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/code/BoundKind.java Mon Jul 27 23:07:00 2009 -0700 @@ -25,7 +25,13 @@ package com.sun.tools.javac.code; - +/** + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + */ public enum BoundKind { EXTENDS("? extends "), SUPER("? super "),
--- a/src/share/classes/com/sun/tools/javac/code/Printer.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/code/Printer.java Mon Jul 27 23:07:00 2009 -0700 @@ -40,6 +40,11 @@ /** * A combined type/symbol visitor for generating non-trivial localized string * representation of types and symbols. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Visitor<String, Locale> {
--- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Mon Jul 27 23:07:00 2009 -0700 @@ -251,7 +251,8 @@ return true; else { Symbol s2 = ((MethodSymbol)sym).implementation(site.tsym, types, true); - return (s2 == null || s2 == sym); + return (s2 == null || s2 == sym || + !types.isSubSignature(types.memberType(site, s2), types.memberType(site, sym))); } } //where
--- a/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java Mon Jul 27 23:07:00 2009 -0700 @@ -36,6 +36,12 @@ import static javax.tools.JavaFileObject.Kind.*; +/** + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> +*/ public abstract class BaseFileObject implements JavaFileObject { protected BaseFileObject(JavacFileManager fileManager) { this.fileManager = fileManager;
--- a/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java Mon Jul 27 23:07:00 2009 -0700 @@ -34,7 +34,12 @@ import java.util.concurrent.ConcurrentHashMap; /** - * Caching implementation of FSInfo + * Caching implementation of FSInfo. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class CacheFSInfo extends FSInfo {
--- a/src/share/classes/com/sun/tools/javac/file/FSInfo.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/FSInfo.java Mon Jul 27 23:07:00 2009 -0700 @@ -16,6 +16,11 @@ /** * Get meta-info about files. Default direct (non-caching) implementation. * @see CacheFSInfo + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class FSInfo {
--- a/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java Mon Jul 27 23:07:00 2009 -0700 @@ -82,6 +82,11 @@ /** * This class provides access to the source, class and other files * used by the compiler and related tools. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class JavacFileManager implements StandardJavaFileManager {
--- a/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java Mon Jul 27 23:07:00 2009 -0700 @@ -42,6 +42,11 @@ /** * A subclass of JavaFileObject representing regular files. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ class RegularFileObject extends BaseFileObject {
--- a/src/share/classes/com/sun/tools/javac/file/RelativePath.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/RelativePath.java Mon Jul 27 23:07:00 2009 -0700 @@ -34,6 +34,11 @@ * Used to represent a platform-neutral path within a platform-specific * container, such as a directory or zip file. * Internally, the file separator is always '/'. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public abstract class RelativePath implements Comparable<RelativePath> { /**
--- a/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java Mon Jul 27 23:07:00 2009 -0700 @@ -35,6 +35,12 @@ import com.sun.tools.javac.file.RelativePath.RelativeFile; import com.sun.tools.javac.util.List; +/** + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> +*/ public class SymbolArchive extends ZipArchive { final File origFile;
--- a/src/share/classes/com/sun/tools/javac/file/ZipArchive.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/ZipArchive.java Mon Jul 27 23:07:00 2009 -0700 @@ -48,6 +48,12 @@ import com.sun.tools.javac.file.RelativePath.RelativeFile; import com.sun.tools.javac.util.List; +/** + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + */ public class ZipArchive implements Archive { public ZipArchive(JavacFileManager fm, ZipFile zdir) throws IOException {
--- a/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java Mon Jul 27 23:07:00 2009 -0700 @@ -67,6 +67,11 @@ * If nonBatchMode option is specified (-XDnonBatchMode) the compiler will use timestamp * checking to reindex the zip files if it is needed. In batch mode the timestamps are not checked * and the compiler uses the cached indexes. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class ZipFileIndex { private static final String MIN_CHAR = String.valueOf(Character.MIN_VALUE);
--- a/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java Mon Jul 27 23:07:00 2009 -0700 @@ -44,6 +44,12 @@ import com.sun.tools.javac.file.RelativePath.RelativeFile; import com.sun.tools.javac.util.List; +/** + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + */ public class ZipFileIndexArchive implements Archive { private final ZipFileIndex zfIndex;
--- a/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java Mon Jul 27 23:07:00 2009 -0700 @@ -34,6 +34,11 @@ /** * A factory for creating parsers. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class ParserFactory {
--- a/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java Mon Jul 27 23:07:00 2009 -0700 @@ -57,6 +57,10 @@ * <li> Provides the formatting logic for rendering the arguments of a JCDiagnostic object. * <ul> * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter<JCDiagnostic> {
--- a/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java Mon Jul 27 23:07:00 2009 -0700 @@ -57,6 +57,11 @@ * <li>%m: the text or the diagnostic, including any appropriate arguments * <li>%_: space delimiter, useful for formatting purposes * </ul> + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter {
--- a/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java Mon Jul 27 23:07:00 2009 -0700 @@ -37,6 +37,11 @@ /** * A delegated diagnostic formatter delegates all formatting * actions to an underlying formatter (aka the delegated formatter). + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class ForwardingDiagnosticFormatter<D extends Diagnostic<?>, F extends DiagnosticFormatter<D>> implements DiagnosticFormatter<D> {
--- a/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java Mon Jul 27 23:07:00 2009 -0700 @@ -39,6 +39,11 @@ * The raw formatter will format a diagnostic according to one of two format patterns, depending on whether * or not the source name and position are set. This formatter provides a standardized, localize-independent * implementation of a diagnostic formatter; as such, this formatter is best suited for testing purposes. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public final class RawDiagnosticFormatter extends AbstractDiagnosticFormatter {
--- a/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Mon Jul 27 23:07:00 2009 -0700 @@ -58,6 +58,11 @@ * formatted and (iii) type-variable disambiguation - when the diagnostic refers * to two different type-variables with the same name, their representation is * disambiguated by appending an index to the type variable name. + * + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class RichDiagnosticFormatter extends ForwardingDiagnosticFormatter<JCDiagnostic, AbstractDiagnosticFormatter> { @@ -569,7 +574,8 @@ @Override public Void visitMethodSymbol(MethodSymbol s, Void ignored) { visit(s.owner, null); - typePreprocessor.visit(s.type); + if (s.type != null) + typePreprocessor.visit(s.type); return null; } };
--- a/src/share/classes/com/sun/tools/javac/util/Warner.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/Warner.java Mon Jul 27 23:07:00 2009 -0700 @@ -31,10 +31,10 @@ * An interface to support optional warnings, needed for support of * unchecked conversions and unchecked casts. * - * <p>Nothing described in this source file is part of any supported - * API. If you write code that depends on this, you do so at your own - * risk. This code and its internal interfaces are subject to change - * or deletion without notice. + * <p><b>This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ public class Warner { public static final Warner noWarnings = new Warner();
--- a/src/share/classes/com/sun/tools/javap/JavapFileManager.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javap/JavapFileManager.java Mon Jul 27 23:07:00 2009 -0700 @@ -44,6 +44,7 @@ class JavapFileManager extends JavacFileManager { private JavapFileManager(Context context, Charset charset) { super(context, true, charset); + setIgnoreSymbolFile(true); } static JavapFileManager create(final DiagnosticListener<? super JavaFileObject> dl, PrintWriter log, Options options) {
--- a/src/share/classes/com/sun/tools/javap/JavapTask.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javap/JavapTask.java Mon Jul 27 23:07:00 2009 -0700 @@ -235,12 +235,6 @@ } }, - new Option(false, "-XDignore.symbol.file") { - void process(JavapTask task, String opt, String arg) { - task.options.ignoreSymbolFile = true; - } - }, - new Option(false, "-XDdetails") { void process(JavapTask task, String opt, String arg) { task.options.details = EnumSet.allOf(InstructionDetailWriter.Kind.class); @@ -477,9 +471,6 @@ throw new BadArgs("err.incompatible.options", sb); } - if (options.ignoreSymbolFile && fileManager instanceof JavapFileManager) - ((JavapFileManager) fileManager).setIgnoreSymbolFile(true); - if ((classes == null || classes.size() == 0) && !(noArgs || options.help || options.version || options.fullVersion)) { throw new BadArgs("err.no.classes.specified");
--- a/src/share/classes/com/sun/tools/javap/Options.java Fri Jul 24 13:40:15 2009 -0700 +++ b/src/share/classes/com/sun/tools/javap/Options.java Mon Jul 27 23:07:00 2009 -0700 @@ -88,5 +88,4 @@ public boolean compat; // bug-for-bug compatibility mode with old javap public boolean jsr277; - public boolean ignoreSymbolFile; // file manager should ignore ct.sym }
--- a/test/tools/apt/Basics/apt.sh Fri Jul 24 13:40:15 2009 -0700 +++ b/test/tools/apt/Basics/apt.sh Mon Jul 27 23:07:00 2009 -0700 @@ -43,7 +43,7 @@ esac # Construct path to apt executable -APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS}" +APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message " printf "%s\n" "-classpath ${TESTCLASSES}" > options printf "%s\n" "-factorypath ./nullap.jar" >> options @@ -58,6 +58,7 @@ printf "%s\n" "-XListAnnotationTypes" >> options1 printf "%s\n" "-XclassesAsDecls" >> options1 + # Construct path to javac executable JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} -source 1.5 -sourcepath ${TESTSRC} -classpath ${TESTJAVA}/lib/tools.jar -d . " JAR="${TESTJAVA}/bin/jar "
--- a/test/tools/apt/Compile/compile.sh Fri Jul 24 13:40:15 2009 -0700 +++ b/test/tools/apt/Compile/compile.sh Mon Jul 27 23:07:00 2009 -0700 @@ -67,7 +67,7 @@ esac -APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} " +APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message " JAVA="${TESTJAVA}/bin/java ${TESTVMOPTS} " JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} "
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/Diagnostics/6860795/T6860795.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,34 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6860795 + * @summary NullPointerException when compiling a negative java source + * @author mcimadamore + * @compile/fail/ref=T6860795.out -XDrawDiagnostics T6860795.java + */ + +class Test { + void foo(float x, int x) {} +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/Diagnostics/6860795/T6860795.out Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,2 @@ +T6860795.java:33:27: compiler.err.already.defined: x, foo +1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/generics/rawOverride/T6846972.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,49 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6846972 + * @summary cannot access member of raw type when erasure change overriding into overloading + * @author mcimadamore + * @compile T6846972.java + */ + +import java.util.EnumMap; + +public class T6846972 { + + enum Suit { + CLUBS, DIAMONDS; + } + + static Object [] array = { + Suit.CLUBS, "value1", + Suit.DIAMONDS, "value2" + }; + + static void test() { + EnumMap map = new EnumMap(Suit.class); + map.put(array[0], array[1]); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javap/T6863746.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,52 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +import java.io.*; + +/* + * @test + * @bug 6863746 + * @summary javap should not scan ct.sym by default + */ + +public class T6863746 { + public static void main(String... args) throws Exception{ + new T6863746().run(); + } + + public void run() throws Exception { + String[] args = { "-c", "java.lang.Object" }; + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + int rc = com.sun.tools.javap.Main.run(args, pw); + pw.close(); + String out = sw.toString(); + System.out.println(out); + String[] lines = out.split("\n"); + // If ct.sym is being read, the output does not include + // Code attributes, so check for Code attributes as a + // way of detecting that ct.sym is not being used. + if (lines.length < 50 || out.indexOf("Code:") == -1) + throw new Exception("unexpected output from javap"); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javap/typeAnnotations/ArrayClassLiterals.java Mon Jul 27 23:07:00 2009 -0700 @@ -0,0 +1,183 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +import java.io.*; +import com.sun.tools.classfile.*; + +/* + * @test ArrayClassLiterals + * @bug 6863814 + * @summary test that class literals array doesn't crash javap + */ + +public class ArrayClassLiterals { + public static void main(String[] args) throws Exception { + new ArrayClassLiterals().run(); + } + + public void run() throws Exception { + File javaFile = writeTestFile(); + File classFile = compileTestFile(javaFile); + + ClassFile cf = ClassFile.read(classFile); + test(cf); + for (Field f : cf.fields) { + test(cf, f); + } + for (Method m: cf.methods) { + test(cf, m); + } + + countAnnotations(); + + if (errors > 0) + throw new Exception(errors + " errors found"); + System.out.println("PASSED"); + } + + void test(ClassFile cf) { + test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); + test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); + } + + void test(ClassFile cf, Method m) { + test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); + test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); + } + + void test(ClassFile cf, Field m) { + test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); + test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); + } + + // test the result of Attributes.getIndex according to expectations + // encoded in the method's name + void test(ClassFile cf, String name, boolean visible) { + int index = cf.attributes.getIndex(cf.constant_pool, name); + if (index != -1) { + Attribute attr = cf.attributes.get(index); + assert attr instanceof RuntimeTypeAnnotations_attribute; + RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; + all += tAttr.annotations.length; + if (visible) + visibles += tAttr.annotations.length; + else + invisibles += tAttr.annotations.length; + + for (ExtendedAnnotation anno : tAttr.annotations) + anno.position.toString(); + } + } + + // test the result of Attributes.getIndex according to expectations + // encoded in the method's name + void test(ClassFile cf, Method m, String name, boolean visible) { + int index = m.attributes.getIndex(cf.constant_pool, name); + if (index != -1) { + Attribute attr = m.attributes.get(index); + assert attr instanceof RuntimeTypeAnnotations_attribute; + RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; + all += tAttr.annotations.length; + if (visible) + visibles += tAttr.annotations.length; + else + invisibles += tAttr.annotations.length; + + for (ExtendedAnnotation anno : tAttr.annotations) + anno.position.toString(); + } + } + + // test the result of Attributes.getIndex according to expectations + // encoded in the method's name + void test(ClassFile cf, Field m, String name, boolean visible) { + int index = m.attributes.getIndex(cf.constant_pool, name); + if (index != -1) { + Attribute attr = m.attributes.get(index); + assert attr instanceof RuntimeTypeAnnotations_attribute; + RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; + all += tAttr.annotations.length; + if (visible) + visibles += tAttr.annotations.length; + else + invisibles += tAttr.annotations.length; + + for (ExtendedAnnotation anno : tAttr.annotations) + anno.position.toString(); + } + } + + File writeTestFile() throws IOException { + File f = new File("Testa.java"); + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); + out.println("import java.util.*;"); + out.println("class Testa { "); + out.println(" @interface A { }"); + + out.println(" void test() {"); + out.println(" Object a = @A String.class;"); + out.println(" Object b = @A String @A [] @A [].class;"); + out.println(" }"); + out.println("}"); + + out.close(); + return f; + } + + File compileTestFile(File f) { + int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); + if (rc != 0) + throw new Error("compilation failed. rc=" + rc); + String path = f.getPath(); + return new File(path.substring(0, path.length() - 5) + ".class"); + } + + void countAnnotations() { + int expected_visibles = 0, expected_invisibles = 4; + int expected_all = expected_visibles + expected_invisibles; + + if (expected_all != all) { + errors++; + System.err.println("expected " + expected_all + + " annotations but found " + all); + } + + if (expected_visibles != visibles) { + errors++; + System.err.println("expected " + expected_visibles + + " visibles annotations but found " + visibles); + } + + if (expected_invisibles != invisibles) { + errors++; + System.err.println("expected " + expected_invisibles + + " invisibles annotations but found " + invisibles); + } + + } + + int errors; + int all; + int visibles; + int invisibles; +}