From 66e84b9ff30de7c75b510cb9117205368cf5bd25 Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Thu, 10 Dec 2009 17:45:56 -0800 Subject: Initial checkin. JSR 305 r49 --- Android.mk | 25 ++ MODULE_LICENSE_BSD_LIKE | 0 NOTICE | 28 ++ README.android | 9 + Readme.rtf | 12 + javadoc/allclasses-frame.html | 98 ++++++ javadoc/allclasses-noframe.html | 98 ++++++ javadoc/constant-values.html | 140 ++++++++ javadoc/deprecated-list.html | 140 ++++++++ javadoc/help-doc.html | 213 ++++++++++++ javadoc/index-all.html | 290 ++++++++++++++++ javadoc/index.html | 39 +++ javadoc/javax/annotation/CheckForNull.html | 166 ++++++++++ javadoc/javax/annotation/CheckForSigned.html | 174 ++++++++++ javadoc/javax/annotation/CheckReturnValue.html | 197 +++++++++++ javadoc/javax/annotation/Detainted.html | 166 ++++++++++ .../javax/annotation/MatchesPattern.Checker.html | 265 +++++++++++++++ javadoc/javax/annotation/MatchesPattern.html | 237 +++++++++++++ javadoc/javax/annotation/Nonnegative.Checker.html | 265 +++++++++++++++ javadoc/javax/annotation/Nonnegative.html | 201 ++++++++++++ javadoc/javax/annotation/Nonnull.Checker.html | 265 +++++++++++++++ javadoc/javax/annotation/Nonnull.html | 197 +++++++++++ javadoc/javax/annotation/Nullable.html | 166 ++++++++++ .../OverridingMethodsMustInvokeSuper.html | 171 ++++++++++ .../annotation/ParametersAreNonnullByDefault.html | 178 ++++++++++ .../annotation/ParametersAreNullableByDefault.html | 181 ++++++++++ javadoc/javax/annotation/PropertyKey.html | 197 +++++++++++ javadoc/javax/annotation/RegEx.Checker.html | 265 +++++++++++++++ javadoc/javax/annotation/RegEx.html | 203 ++++++++++++ javadoc/javax/annotation/Signed.html | 170 ++++++++++ javadoc/javax/annotation/Syntax.html | 261 +++++++++++++++ javadoc/javax/annotation/Tainted.html | 166 ++++++++++ javadoc/javax/annotation/Untainted.html | 197 +++++++++++ javadoc/javax/annotation/WillClose.html | 164 +++++++++ javadoc/javax/annotation/WillCloseWhenClosed.html | 164 +++++++++ javadoc/javax/annotation/WillNotClose.html | 164 +++++++++ javadoc/javax/annotation/concurrent/GuardedBy.html | 224 +++++++++++++ javadoc/javax/annotation/concurrent/Immutable.html | 182 ++++++++++ .../javax/annotation/concurrent/NotThreadSafe.html | 176 ++++++++++ .../javax/annotation/concurrent/ThreadSafe.html | 175 ++++++++++ .../javax/annotation/concurrent/package-frame.html | 38 +++ .../annotation/concurrent/package-summary.html | 174 ++++++++++ .../javax/annotation/concurrent/package-tree.html | 149 +++++++++ javadoc/javax/annotation/meta/Exclusive.html | 185 +++++++++++ javadoc/javax/annotation/meta/Exhaustive.html | 194 +++++++++++ javadoc/javax/annotation/meta/TypeQualifier.html | 207 ++++++++++++ .../annotation/meta/TypeQualifierDefault.html | 203 ++++++++++++ .../annotation/meta/TypeQualifierNickname.html | 184 +++++++++++ .../annotation/meta/TypeQualifierValidator.html | 214 ++++++++++++ javadoc/javax/annotation/meta/When.html | 365 +++++++++++++++++++++ javadoc/javax/annotation/meta/package-frame.html | 62 ++++ javadoc/javax/annotation/meta/package-summary.html | 203 ++++++++++++ javadoc/javax/annotation/meta/package-tree.html | 165 ++++++++++ javadoc/javax/annotation/package-frame.html | 87 +++++ javadoc/javax/annotation/package-summary.html | 276 ++++++++++++++++ javadoc/javax/annotation/package-tree.html | 176 ++++++++++ javadoc/overview-frame.html | 46 +++ javadoc/overview-summary.html | 159 +++++++++ javadoc/overview-tree.html | 199 +++++++++++ javadoc/package-list | 3 + javadoc/resources/inherit.gif | Bin 0 -> 57 bytes javadoc/stylesheet.css | 29 ++ pom.xml | 37 +++ proposedAnnotations/pom.xml | 19 ++ ri/.classpath | 6 + ri/.project | 17 + ri/.settings/org.eclipse.jdt.core.prefs | 12 + ri/.settings/org.eclipse.jdt.ui.prefs | 3 + ri/LICENSE | 28 ++ ri/build.xml | 35 ++ ri/nbproject/project.xml | 78 +++++ ri/pom.xml | 20 ++ .../main/java/javax/annotation/CheckForNull.java | 16 + .../main/java/javax/annotation/CheckForSigned.java | 24 ++ .../java/javax/annotation/CheckReturnValue.java | 17 + ri/src/main/java/javax/annotation/Detainted.java | 16 + .../main/java/javax/annotation/MatchesPattern.java | 30 ++ ri/src/main/java/javax/annotation/Nonnegative.java | 41 +++ ri/src/main/java/javax/annotation/Nonnull.java | 26 ++ ri/src/main/java/javax/annotation/Nullable.java | 16 + .../OverridingMethodsMustInvokeSuper.java | 20 ++ .../annotation/ParametersAreNonnullByDefault.java | 27 ++ .../annotation/ParametersAreNullableByDefault.java | 30 ++ ri/src/main/java/javax/annotation/PropertyKey.java | 15 + ri/src/main/java/javax/annotation/RegEx.java | 42 +++ ri/src/main/java/javax/annotation/Signed.java | 18 + ri/src/main/java/javax/annotation/Syntax.java | 44 +++ ri/src/main/java/javax/annotation/Tainted.java | 16 + ri/src/main/java/javax/annotation/Untainted.java | 15 + ri/src/main/java/javax/annotation/WillClose.java | 15 + .../java/javax/annotation/WillCloseWhenClosed.java | 15 + .../main/java/javax/annotation/WillNotClose.java | 15 + .../javax/annotation/concurrent/GuardedBy.java | 38 +++ .../javax/annotation/concurrent/Immutable.java | 36 ++ .../javax/annotation/concurrent/NotThreadSafe.java | 30 ++ .../javax/annotation/concurrent/ThreadSafe.java | 22 ++ .../main/java/javax/annotation/meta/Exclusive.java | 26 ++ .../java/javax/annotation/meta/Exhaustive.java | 33 ++ .../java/javax/annotation/meta/TypeQualifier.java | 27 ++ .../annotation/meta/TypeQualifierDefault.java | 20 ++ .../annotation/meta/TypeQualifierNickname.java | 33 ++ .../annotation/meta/TypeQualifierValidator.java | 21 ++ ri/src/main/java/javax/annotation/meta/When.java | 23 ++ sampleUses/.classpath | 7 + sampleUses/.project | 17 + sampleUses/pom.xml | 26 ++ sampleUses/src/main/java/CreditCardNumber.java | 27 ++ sampleUses/src/main/java/FixedLengthString.java | 26 ++ sampleUses/src/main/java/LuhnVerification.java | 26 ++ sampleUses/src/main/java/SocialSecurityNumber.java | 14 + .../java/edu/umd/cs/findbugs/DottedClassName.java | 14 + .../java/edu/umd/cs/findbugs/SlashedClassName.java | 15 + .../examples/ParametersAreSlashedByDefault.java | 13 + .../java/edu/umd/cs/findbugs/examples/Test.java | 31 ++ .../edu/umd/cs/findbugs/examples/TestDefaults.java | 19 ++ .../main/java/java/sql/ResultSetConcurrency.java | 14 + .../main/java/java/sql/ResultSetHoldability.java | 14 + .../src/main/java/java/sql/ResultSetType.java | 14 + tcl/pom.xml | 27 ++ 119 files changed, 11273 insertions(+) create mode 100644 Android.mk create mode 100644 MODULE_LICENSE_BSD_LIKE create mode 100644 NOTICE create mode 100644 README.android create mode 100644 Readme.rtf create mode 100644 javadoc/allclasses-frame.html create mode 100644 javadoc/allclasses-noframe.html create mode 100644 javadoc/constant-values.html create mode 100644 javadoc/deprecated-list.html create mode 100644 javadoc/help-doc.html create mode 100644 javadoc/index-all.html create mode 100644 javadoc/index.html create mode 100644 javadoc/javax/annotation/CheckForNull.html create mode 100644 javadoc/javax/annotation/CheckForSigned.html create mode 100644 javadoc/javax/annotation/CheckReturnValue.html create mode 100644 javadoc/javax/annotation/Detainted.html create mode 100644 javadoc/javax/annotation/MatchesPattern.Checker.html create mode 100644 javadoc/javax/annotation/MatchesPattern.html create mode 100644 javadoc/javax/annotation/Nonnegative.Checker.html create mode 100644 javadoc/javax/annotation/Nonnegative.html create mode 100644 javadoc/javax/annotation/Nonnull.Checker.html create mode 100644 javadoc/javax/annotation/Nonnull.html create mode 100644 javadoc/javax/annotation/Nullable.html create mode 100644 javadoc/javax/annotation/OverridingMethodsMustInvokeSuper.html create mode 100644 javadoc/javax/annotation/ParametersAreNonnullByDefault.html create mode 100644 javadoc/javax/annotation/ParametersAreNullableByDefault.html create mode 100644 javadoc/javax/annotation/PropertyKey.html create mode 100644 javadoc/javax/annotation/RegEx.Checker.html create mode 100644 javadoc/javax/annotation/RegEx.html create mode 100644 javadoc/javax/annotation/Signed.html create mode 100644 javadoc/javax/annotation/Syntax.html create mode 100644 javadoc/javax/annotation/Tainted.html create mode 100644 javadoc/javax/annotation/Untainted.html create mode 100644 javadoc/javax/annotation/WillClose.html create mode 100644 javadoc/javax/annotation/WillCloseWhenClosed.html create mode 100644 javadoc/javax/annotation/WillNotClose.html create mode 100644 javadoc/javax/annotation/concurrent/GuardedBy.html create mode 100644 javadoc/javax/annotation/concurrent/Immutable.html create mode 100644 javadoc/javax/annotation/concurrent/NotThreadSafe.html create mode 100644 javadoc/javax/annotation/concurrent/ThreadSafe.html create mode 100644 javadoc/javax/annotation/concurrent/package-frame.html create mode 100644 javadoc/javax/annotation/concurrent/package-summary.html create mode 100644 javadoc/javax/annotation/concurrent/package-tree.html create mode 100644 javadoc/javax/annotation/meta/Exclusive.html create mode 100644 javadoc/javax/annotation/meta/Exhaustive.html create mode 100644 javadoc/javax/annotation/meta/TypeQualifier.html create mode 100644 javadoc/javax/annotation/meta/TypeQualifierDefault.html create mode 100644 javadoc/javax/annotation/meta/TypeQualifierNickname.html create mode 100644 javadoc/javax/annotation/meta/TypeQualifierValidator.html create mode 100644 javadoc/javax/annotation/meta/When.html create mode 100644 javadoc/javax/annotation/meta/package-frame.html create mode 100644 javadoc/javax/annotation/meta/package-summary.html create mode 100644 javadoc/javax/annotation/meta/package-tree.html create mode 100644 javadoc/javax/annotation/package-frame.html create mode 100644 javadoc/javax/annotation/package-summary.html create mode 100644 javadoc/javax/annotation/package-tree.html create mode 100644 javadoc/overview-frame.html create mode 100644 javadoc/overview-summary.html create mode 100644 javadoc/overview-tree.html create mode 100644 javadoc/package-list create mode 100644 javadoc/resources/inherit.gif create mode 100644 javadoc/stylesheet.css create mode 100644 pom.xml create mode 100644 proposedAnnotations/pom.xml create mode 100644 ri/.classpath create mode 100644 ri/.project create mode 100644 ri/.settings/org.eclipse.jdt.core.prefs create mode 100644 ri/.settings/org.eclipse.jdt.ui.prefs create mode 100644 ri/LICENSE create mode 100644 ri/build.xml create mode 100644 ri/nbproject/project.xml create mode 100644 ri/pom.xml create mode 100644 ri/src/main/java/javax/annotation/CheckForNull.java create mode 100644 ri/src/main/java/javax/annotation/CheckForSigned.java create mode 100644 ri/src/main/java/javax/annotation/CheckReturnValue.java create mode 100644 ri/src/main/java/javax/annotation/Detainted.java create mode 100644 ri/src/main/java/javax/annotation/MatchesPattern.java create mode 100644 ri/src/main/java/javax/annotation/Nonnegative.java create mode 100644 ri/src/main/java/javax/annotation/Nonnull.java create mode 100644 ri/src/main/java/javax/annotation/Nullable.java create mode 100644 ri/src/main/java/javax/annotation/OverridingMethodsMustInvokeSuper.java create mode 100644 ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java create mode 100644 ri/src/main/java/javax/annotation/ParametersAreNullableByDefault.java create mode 100644 ri/src/main/java/javax/annotation/PropertyKey.java create mode 100644 ri/src/main/java/javax/annotation/RegEx.java create mode 100644 ri/src/main/java/javax/annotation/Signed.java create mode 100644 ri/src/main/java/javax/annotation/Syntax.java create mode 100644 ri/src/main/java/javax/annotation/Tainted.java create mode 100644 ri/src/main/java/javax/annotation/Untainted.java create mode 100644 ri/src/main/java/javax/annotation/WillClose.java create mode 100644 ri/src/main/java/javax/annotation/WillCloseWhenClosed.java create mode 100644 ri/src/main/java/javax/annotation/WillNotClose.java create mode 100644 ri/src/main/java/javax/annotation/concurrent/GuardedBy.java create mode 100644 ri/src/main/java/javax/annotation/concurrent/Immutable.java create mode 100644 ri/src/main/java/javax/annotation/concurrent/NotThreadSafe.java create mode 100644 ri/src/main/java/javax/annotation/concurrent/ThreadSafe.java create mode 100644 ri/src/main/java/javax/annotation/meta/Exclusive.java create mode 100644 ri/src/main/java/javax/annotation/meta/Exhaustive.java create mode 100644 ri/src/main/java/javax/annotation/meta/TypeQualifier.java create mode 100644 ri/src/main/java/javax/annotation/meta/TypeQualifierDefault.java create mode 100644 ri/src/main/java/javax/annotation/meta/TypeQualifierNickname.java create mode 100644 ri/src/main/java/javax/annotation/meta/TypeQualifierValidator.java create mode 100644 ri/src/main/java/javax/annotation/meta/When.java create mode 100644 sampleUses/.classpath create mode 100644 sampleUses/.project create mode 100644 sampleUses/pom.xml create mode 100644 sampleUses/src/main/java/CreditCardNumber.java create mode 100644 sampleUses/src/main/java/FixedLengthString.java create mode 100644 sampleUses/src/main/java/LuhnVerification.java create mode 100644 sampleUses/src/main/java/SocialSecurityNumber.java create mode 100644 sampleUses/src/main/java/edu/umd/cs/findbugs/DottedClassName.java create mode 100644 sampleUses/src/main/java/edu/umd/cs/findbugs/SlashedClassName.java create mode 100644 sampleUses/src/main/java/edu/umd/cs/findbugs/examples/ParametersAreSlashedByDefault.java create mode 100644 sampleUses/src/main/java/edu/umd/cs/findbugs/examples/Test.java create mode 100644 sampleUses/src/main/java/edu/umd/cs/findbugs/examples/TestDefaults.java create mode 100644 sampleUses/src/main/java/java/sql/ResultSetConcurrency.java create mode 100644 sampleUses/src/main/java/java/sql/ResultSetHoldability.java create mode 100644 sampleUses/src/main/java/java/sql/ResultSetType.java create mode 100644 tcl/pom.xml diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..aec5c34 --- /dev/null +++ b/Android.mk @@ -0,0 +1,25 @@ +# Copyright (C) 2009 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(call all-java-files-under, ri/src/main/java) + +LOCAL_MODULE := jsr305 + +include $(BUILD_JAVA_LIBRARY) + diff --git a/MODULE_LICENSE_BSD_LIKE b/MODULE_LICENSE_BSD_LIKE new file mode 100644 index 0000000..e69de29 diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..6736681 --- /dev/null +++ b/NOTICE @@ -0,0 +1,28 @@ +Copyright (c) 2007-2009, JSR305 expert group +All rights reserved. + +http://www.opensource.org/licenses/bsd-license.php + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the JSR305 expert group nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/README.android b/README.android new file mode 100644 index 0000000..e4cdaf9 --- /dev/null +++ b/README.android @@ -0,0 +1,9 @@ +URL: http://code.google.com/p/jsr-305/ +Version: r49 +License: BSD +Description: "Annotations for Software Defect Detection." ie. @Nullable and friends +Local Modifications: No local modifications + +This APIs in this library are not included on the device. They may, however, be +included in test cases etc. + diff --git a/Readme.rtf b/Readme.rtf new file mode 100644 index 0000000..7880558 --- /dev/null +++ b/Readme.rtf @@ -0,0 +1,12 @@ +{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural + +\f0\fs24 \cf0 After installing maven, do the update and at the main directory, run either\ +\ + * mvn eclipse:clean eclipse:eclipse\ + * mvn idea:idea\ +\ +} \ No newline at end of file diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html new file mode 100644 index 0000000..59875d2 --- /dev/null +++ b/javadoc/allclasses-frame.html @@ -0,0 +1,98 @@ + + + + + + +All Classes + + + + + + + + + + +All Classes +
+ + + + + +
CheckForNull +
+CheckForSigned +
+CheckReturnValue +
+Detainted +
+Exclusive +
+Exhaustive +
+GuardedBy +
+Immutable +
+MatchesPattern +
+MatchesPattern.Checker +
+Nonnegative +
+Nonnegative.Checker +
+Nonnull +
+Nonnull.Checker +
+NotThreadSafe +
+Nullable +
+OverridingMethodsMustInvokeSuper +
+ParametersAreNonnullByDefault +
+ParametersAreNullableByDefault +
+PropertyKey +
+RegEx +
+RegEx.Checker +
+Signed +
+Syntax +
+Tainted +
+ThreadSafe +
+TypeQualifier +
+TypeQualifierDefault +
+TypeQualifierNickname +
+TypeQualifierValidator +
+Untainted +
+When +
+WillClose +
+WillCloseWhenClosed +
+WillNotClose +
+
+ + + diff --git a/javadoc/allclasses-noframe.html b/javadoc/allclasses-noframe.html new file mode 100644 index 0000000..324cd3c --- /dev/null +++ b/javadoc/allclasses-noframe.html @@ -0,0 +1,98 @@ + + + + + + +All Classes + + + + + + + + + + +All Classes +
+ + + + + +
CheckForNull +
+CheckForSigned +
+CheckReturnValue +
+Detainted +
+Exclusive +
+Exhaustive +
+GuardedBy +
+Immutable +
+MatchesPattern +
+MatchesPattern.Checker +
+Nonnegative +
+Nonnegative.Checker +
+Nonnull +
+Nonnull.Checker +
+NotThreadSafe +
+Nullable +
+OverridingMethodsMustInvokeSuper +
+ParametersAreNonnullByDefault +
+ParametersAreNullableByDefault +
+PropertyKey +
+RegEx +
+RegEx.Checker +
+Signed +
+Syntax +
+Tainted +
+ThreadSafe +
+TypeQualifier +
+TypeQualifierDefault +
+TypeQualifierNickname +
+TypeQualifierValidator +
+Untainted +
+When +
+WillClose +
+WillCloseWhenClosed +
+WillNotClose +
+
+ + + diff --git a/javadoc/constant-values.html b/javadoc/constant-values.html new file mode 100644 index 0000000..39bf0d0 --- /dev/null +++ b/javadoc/constant-values.html @@ -0,0 +1,140 @@ + + + + + + +Constant Field Values + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/deprecated-list.html b/javadoc/deprecated-list.html new file mode 100644 index 0000000..a46b869 --- /dev/null +++ b/javadoc/deprecated-list.html @@ -0,0 +1,140 @@ + + + + + + +Deprecated List + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Deprecated API

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/help-doc.html b/javadoc/help-doc.html new file mode 100644 index 0000000..3290355 --- /dev/null +++ b/javadoc/help-doc.html @@ -0,0 +1,213 @@ + + + + + + +API Help + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+How This API Document Is Organized

+
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

+Overview

+
+ +

+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+

+Package

+
+ +

+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

+
+

+Class/Interface

+
+ +

+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+ +

+Annotation Type

+
+ +

+Each annotation type has its own separate page with the following sections:

+
+ +

+Enum

+
+ +

+Each enum has its own separate page with the following sections:

+
+

+Tree (Class Hierarchy)

+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object. +
+

+Deprecated API

+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+

+Index

+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+

+Prev/Next

+These links take you to the next or previous class, interface, package, or related page.

+Frames/No Frames

+These links show and hide the HTML frames. All pages are available with or without frames. +

+

+Serialized Form

+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. +

+

+Constant Field Values

+The Constant Field Values page lists the static final fields and their values. +

+ + +This help file applies to API documentation generated using the standard doclet. + +
+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/index-all.html b/javadoc/index-all.html new file mode 100644 index 0000000..4f4d11c --- /dev/null +++ b/javadoc/index-all.html @@ -0,0 +1,290 @@ + + + + + + +Index + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +C D E F G I J M N O P R S T U V W
+

+C

+
+
CheckForNull - Annotation Type in javax.annotation
 
CheckForSigned - Annotation Type in javax.annotation
Used to annotate a value that may be either negative or nonnegative, and + indicates that uses of it should check for + negative values before using it in a way that requires the value to be + nonnegative, and check for it being nonnegative before using it in a way that + requires it to be negative.
CheckReturnValue - Annotation Type in javax.annotation
 
+
+

+D

+
+
Detainted - Annotation Type in javax.annotation
 
+
+

+E

+
+
Exclusive - Annotation Type in javax.annotation.meta
This annotation can be applied to the value() element of an annotation that + is annotated as a TypeQualifier.
Exhaustive - Annotation Type in javax.annotation.meta
This annotation can be applied to the value() element of an annotation that + is annotated as a TypeQualifier.
+
+

+F

+
+
forConstantValue(MatchesPattern, Object) - +Method in class javax.annotation.MatchesPattern.Checker +
  +
forConstantValue(A, Object) - +Method in interface javax.annotation.meta.TypeQualifierValidator +
Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier. +
forConstantValue(Nonnegative, Object) - +Method in class javax.annotation.Nonnegative.Checker +
  +
forConstantValue(Nonnull, Object) - +Method in class javax.annotation.Nonnull.Checker +
  +
forConstantValue(RegEx, Object) - +Method in class javax.annotation.RegEx.Checker +
  +
+
+

+G

+
+
GuardedBy - Annotation Type in javax.annotation.concurrent
GuardedBy + + The field or method to which this annotation is applied can only be accessed + when holding a particular lock, which may be a built-in (synchronization) + lock, or may be an explicit java.util.concurrent.Lock.
+
+

+I

+
+
Immutable - Annotation Type in javax.annotation.concurrent
Immutable + + The class to which this annotation is applied is immutable.
+
+

+J

+
+
javax.annotation - package javax.annotation
 
javax.annotation.concurrent - package javax.annotation.concurrent
 
javax.annotation.meta - package javax.annotation.meta
 
+
+

+M

+
+
MatchesPattern - Annotation Type in javax.annotation
 
MatchesPattern.Checker - Class in javax.annotation
 
MatchesPattern.Checker() - +Constructor for class javax.annotation.MatchesPattern.Checker +
  +
+
+

+N

+
+
Nonnegative - Annotation Type in javax.annotation
Used to annotate a value that should only contain nonnegative values
Nonnegative.Checker - Class in javax.annotation
 
Nonnegative.Checker() - +Constructor for class javax.annotation.Nonnegative.Checker +
  +
Nonnull - Annotation Type in javax.annotation
 
Nonnull.Checker - Class in javax.annotation
 
Nonnull.Checker() - +Constructor for class javax.annotation.Nonnull.Checker +
  +
NotThreadSafe - Annotation Type in javax.annotation.concurrent
NotThreadSafe + + The class to which this annotation is applied is not thread-safe.
Nullable - Annotation Type in javax.annotation
 
+
+

+O

+
+
OverridingMethodsMustInvokeSuper - Annotation Type in javax.annotation
When this annotation is applied to a method, it indicates that if this method + is overridden in a subclass, the overriding method should invoke this method + (through method invocation on super).
+
+

+P

+
+
ParametersAreNonnullByDefault - Annotation Type in javax.annotation
This annotation can be applied to a package, class or method to indicate that + the method parameters in that element are nonnull by default unless there is: + + An explicit nullness annotation + The method overrides a method in a superclass (in which case the + annotation of the corresponding parameter in the superclass applies) + there is a default parameter annotation applied to a more tightly nested + element.
ParametersAreNullableByDefault - Annotation Type in javax.annotation
This annotation can be applied to a package, class or method to indicate that + the method parameters in that element are nullable by default unless there is: + + An explicit nullness annotation + The method overrides a method in a superclass (in which case the + annotation of the corresponding parameter in the superclass applies) + there is a default parameter annotation applied to a more tightly nested + element.
PropertyKey - Annotation Type in javax.annotation
 
+
+

+R

+
+
RegEx - Annotation Type in javax.annotation
This qualifier is used to denote String values that should be a Regular + expression.
RegEx.Checker - Class in javax.annotation
 
RegEx.Checker() - +Constructor for class javax.annotation.RegEx.Checker +
  +
+
+

+S

+
+
Signed - Annotation Type in javax.annotation
Used to annotate a value of unknown sign
Syntax - Annotation Type in javax.annotation
This annotation a value that is of a particular syntax, such as Java syntax + or regular expression syntax.
+
+

+T

+
+
Tainted - Annotation Type in javax.annotation
 
ThreadSafe - Annotation Type in javax.annotation.concurrent
ThreadSafe + + The class to which this annotation is applied is thread-safe.
TypeQualifier - Annotation Type in javax.annotation.meta
This qualifier is applied to an annotation to denote that the annotation + should be treated as a type qualifier.
TypeQualifierDefault - Annotation Type in javax.annotation.meta
This qualifier is applied to an annotation to denote that the annotation + defines a default type qualifier that is visible within the scope of the + element it is applied to.
TypeQualifierNickname - Annotation Type in javax.annotation.meta
This annotation is applied to a annotation, and marks the annotation as being + a qualifier nickname.
TypeQualifierValidator<A extends java.lang.annotation.Annotation> - Interface in javax.annotation.meta
 
+
+

+U

+
+
Untainted - Annotation Type in javax.annotation
 
+
+

+V

+
+
valueOf(String) - +Static method in enum javax.annotation.meta.When +
Returns the enum constant of this type with the specified name. +
values() - +Static method in enum javax.annotation.meta.When +
Returns an array containing the constants of this enum type, in +the order they're declared. +
+
+

+W

+
+
When - Enum in javax.annotation.meta
Used to describe the relationship between a qualifier T and the set of values + S possible on an annotated element.
WillClose - Annotation Type in javax.annotation
 
WillCloseWhenClosed - Annotation Type in javax.annotation
 
WillNotClose - Annotation Type in javax.annotation
 
+
+C D E F G I J M N O P R S T U V W + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/index.html b/javadoc/index.html new file mode 100644 index 0000000..df3da15 --- /dev/null +++ b/javadoc/index.html @@ -0,0 +1,39 @@ + + + + + + +Generated Documentation (Untitled) + + + + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="overview-summary.html">Non-frame version.</A> + + + diff --git a/javadoc/javax/annotation/CheckForNull.html b/javadoc/javax/annotation/CheckForNull.html new file mode 100644 index 0000000..ca497e2 --- /dev/null +++ b/javadoc/javax/annotation/CheckForNull.html @@ -0,0 +1,166 @@ + + + + + + +CheckForNull + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type CheckForNull

+
+
+
@Documented
+@TypeQualifierNickname
+@Nonnull(when=MAYBE)
+@Retention(value=RUNTIME)
+public @interface CheckForNull
+ + +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/CheckForSigned.html b/javadoc/javax/annotation/CheckForSigned.html new file mode 100644 index 0000000..3217613 --- /dev/null +++ b/javadoc/javax/annotation/CheckForSigned.html @@ -0,0 +1,174 @@ + + + + + + +CheckForSigned + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type CheckForSigned

+
+
+
@Documented
+@TypeQualifierNickname
+@Nonnegative(when=MAYBE)
+@Retention(value=RUNTIME)
+public @interface CheckForSigned
+ + +

+Used to annotate a value that may be either negative or nonnegative, and + indicates that uses of it should check for + negative values before using it in a way that requires the value to be + nonnegative, and check for it being nonnegative before using it in a way that + requires it to be negative. +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/CheckReturnValue.html b/javadoc/javax/annotation/CheckReturnValue.html new file mode 100644 index 0000000..f996e9e --- /dev/null +++ b/javadoc/javax/annotation/CheckReturnValue.html @@ -0,0 +1,197 @@ + + + + + + +CheckReturnValue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type CheckReturnValue

+
+
+
@Documented
+@Target(value={METHOD,CONSTRUCTOR,TYPE,PACKAGE})
+@Retention(value=RUNTIME)
+public @interface CheckReturnValue
+ + +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ Whenwhen + +
+           
+  +

+

+when

+
+public abstract When when
+
+
+
+
+
+
+
+
Default:
ALWAYS
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Detainted.html b/javadoc/javax/annotation/Detainted.html new file mode 100644 index 0000000..82cfa21 --- /dev/null +++ b/javadoc/javax/annotation/Detainted.html @@ -0,0 +1,166 @@ + + + + + + +Detainted + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Detainted

+
+
+
@Documented
+@TypeQualifierNickname
+@Untainted(when=ALWAYS)
+@Retention(value=RUNTIME)
+public @interface Detainted
+ + +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/MatchesPattern.Checker.html b/javadoc/javax/annotation/MatchesPattern.Checker.html new file mode 100644 index 0000000..5173a0a --- /dev/null +++ b/javadoc/javax/annotation/MatchesPattern.Checker.html @@ -0,0 +1,265 @@ + + + + + + +MatchesPattern.Checker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Class MatchesPattern.Checker

+
+java.lang.Object
+  extended by javax.annotation.MatchesPattern.Checker
+
+
+
All Implemented Interfaces:
TypeQualifierValidator<MatchesPattern>
+
+
+
Enclosing class:
MatchesPattern
+
+
+
+
public static class MatchesPattern.Checker
extends java.lang.Object
implements TypeQualifierValidator<MatchesPattern>
+ + +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
MatchesPattern.Checker() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ WhenforConstantValue(MatchesPattern annotation, + java.lang.Object value) + +
+          Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+MatchesPattern.Checker

+
+public MatchesPattern.Checker()
+
+
+ + + + + + + + +
+Method Detail
+ +

+forConstantValue

+
+public When forConstantValue(MatchesPattern annotation,
+                             java.lang.Object value)
+
+
Description copied from interface: TypeQualifierValidator
+
Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier. +

+

+
Specified by:
forConstantValue in interface TypeQualifierValidator<MatchesPattern>
+
+
+
Parameters:
annotation - the type qualifier
value - the value to check +
Returns:
a value indicating whether or not the value is an member of the + values denoted by the type qualifier
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/MatchesPattern.html b/javadoc/javax/annotation/MatchesPattern.html new file mode 100644 index 0000000..5c91340 --- /dev/null +++ b/javadoc/javax/annotation/MatchesPattern.html @@ -0,0 +1,237 @@ + + + + + + +MatchesPattern + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type MatchesPattern

+
+
+
@Documented
+@TypeQualifier(applicableTo=java.lang.String.class)
+@Retention(value=RUNTIME)
+public @interface MatchesPattern
+ + +

+


+ +

+ + + + + + + + + + + +
+Required Element Summary
+ java.lang.Stringvalue + +
+           
+ + + + + + + + + + +
+Optional Element Summary
+ intflags + +
+           
+  +

+ + + + + + + + +
+Element Detail
+ +

+value

+
+@RegEx
+public abstract java.lang.String value
+
+
+
+
+
+
+
+

+flags

+
+public abstract int flags
+
+
+
+
+
+
+
+
Default:
0
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Nonnegative.Checker.html b/javadoc/javax/annotation/Nonnegative.Checker.html new file mode 100644 index 0000000..5cd6960 --- /dev/null +++ b/javadoc/javax/annotation/Nonnegative.Checker.html @@ -0,0 +1,265 @@ + + + + + + +Nonnegative.Checker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Class Nonnegative.Checker

+
+java.lang.Object
+  extended by javax.annotation.Nonnegative.Checker
+
+
+
All Implemented Interfaces:
TypeQualifierValidator<Nonnegative>
+
+
+
Enclosing class:
Nonnegative
+
+
+
+
public static class Nonnegative.Checker
extends java.lang.Object
implements TypeQualifierValidator<Nonnegative>
+ + +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
Nonnegative.Checker() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ WhenforConstantValue(Nonnegative annotation, + java.lang.Object v) + +
+          Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+Nonnegative.Checker

+
+public Nonnegative.Checker()
+
+
+ + + + + + + + +
+Method Detail
+ +

+forConstantValue

+
+public When forConstantValue(Nonnegative annotation,
+                             java.lang.Object v)
+
+
Description copied from interface: TypeQualifierValidator
+
Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier. +

+

+
Specified by:
forConstantValue in interface TypeQualifierValidator<Nonnegative>
+
+
+
Parameters:
annotation - the type qualifier
v - the value to check +
Returns:
a value indicating whether or not the value is an member of the + values denoted by the type qualifier
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Nonnegative.html b/javadoc/javax/annotation/Nonnegative.html new file mode 100644 index 0000000..9ca015a --- /dev/null +++ b/javadoc/javax/annotation/Nonnegative.html @@ -0,0 +1,201 @@ + + + + + + +Nonnegative + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Nonnegative

+
+
+
@Documented
+@TypeQualifier(applicableTo=java.lang.Number.class)
+@Retention(value=RUNTIME)
+public @interface Nonnegative
+ + +

+Used to annotate a value that should only contain nonnegative values +

+ +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ Whenwhen + +
+           
+  +

+

+when

+
+public abstract When when
+
+
+
+
+
+
+
+
Default:
ALWAYS
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Nonnull.Checker.html b/javadoc/javax/annotation/Nonnull.Checker.html new file mode 100644 index 0000000..9f9abe0 --- /dev/null +++ b/javadoc/javax/annotation/Nonnull.Checker.html @@ -0,0 +1,265 @@ + + + + + + +Nonnull.Checker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Class Nonnull.Checker

+
+java.lang.Object
+  extended by javax.annotation.Nonnull.Checker
+
+
+
All Implemented Interfaces:
TypeQualifierValidator<Nonnull>
+
+
+
Enclosing class:
Nonnull
+
+
+
+
public static class Nonnull.Checker
extends java.lang.Object
implements TypeQualifierValidator<Nonnull>
+ + +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
Nonnull.Checker() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ WhenforConstantValue(Nonnull qualifierqualifierArgument, + java.lang.Object value) + +
+          Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+Nonnull.Checker

+
+public Nonnull.Checker()
+
+
+ + + + + + + + +
+Method Detail
+ +

+forConstantValue

+
+public When forConstantValue(Nonnull qualifierqualifierArgument,
+                             java.lang.Object value)
+
+
Description copied from interface: TypeQualifierValidator
+
Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier. +

+

+
Specified by:
forConstantValue in interface TypeQualifierValidator<Nonnull>
+
+
+
Parameters:
qualifierqualifierArgument - the type qualifier
value - the value to check +
Returns:
a value indicating whether or not the value is an member of the + values denoted by the type qualifier
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Nonnull.html b/javadoc/javax/annotation/Nonnull.html new file mode 100644 index 0000000..77ee1ec --- /dev/null +++ b/javadoc/javax/annotation/Nonnull.html @@ -0,0 +1,197 @@ + + + + + + +Nonnull + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Nonnull

+
+
+
@Documented
+@TypeQualifier
+@Retention(value=RUNTIME)
+public @interface Nonnull
+ + +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ Whenwhen + +
+           
+  +

+

+when

+
+public abstract When when
+
+
+
+
+
+
+
+
Default:
ALWAYS
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Nullable.html b/javadoc/javax/annotation/Nullable.html new file mode 100644 index 0000000..4f4b6cf --- /dev/null +++ b/javadoc/javax/annotation/Nullable.html @@ -0,0 +1,166 @@ + + + + + + +Nullable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Nullable

+
+
+
@Documented
+@TypeQualifierNickname
+@Nonnull(when=UNKNOWN)
+@Retention(value=RUNTIME)
+public @interface Nullable
+ + +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/OverridingMethodsMustInvokeSuper.html b/javadoc/javax/annotation/OverridingMethodsMustInvokeSuper.html new file mode 100644 index 0000000..556655d --- /dev/null +++ b/javadoc/javax/annotation/OverridingMethodsMustInvokeSuper.html @@ -0,0 +1,171 @@ + + + + + + +OverridingMethodsMustInvokeSuper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type OverridingMethodsMustInvokeSuper

+
+
+
@Documented
+@Target(value=METHOD)
+@Retention(value=RUNTIME)
+public @interface OverridingMethodsMustInvokeSuper
+ + +

+When this annotation is applied to a method, it indicates that if this method + is overridden in a subclass, the overriding method should invoke this method + (through method invocation on super). +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/ParametersAreNonnullByDefault.html b/javadoc/javax/annotation/ParametersAreNonnullByDefault.html new file mode 100644 index 0000000..96f6032 --- /dev/null +++ b/javadoc/javax/annotation/ParametersAreNonnullByDefault.html @@ -0,0 +1,178 @@ + + + + + + +ParametersAreNonnullByDefault + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type ParametersAreNonnullByDefault

+
+
+
@Documented
+@Nonnull
+@TypeQualifierDefault(value=PARAMETER)
+@Retention(value=RUNTIME)
+public @interface ParametersAreNonnullByDefault
+ + +

+This annotation can be applied to a package, class or method to indicate that + the method parameters in that element are nonnull by default unless there is: +

+

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/ParametersAreNullableByDefault.html b/javadoc/javax/annotation/ParametersAreNullableByDefault.html new file mode 100644 index 0000000..f534efa --- /dev/null +++ b/javadoc/javax/annotation/ParametersAreNullableByDefault.html @@ -0,0 +1,181 @@ + + + + + + +ParametersAreNullableByDefault + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type ParametersAreNullableByDefault

+
+
+
@Documented
+@Nullable
+@TypeQualifierDefault(value=PARAMETER)
+@Retention(value=RUNTIME)
+public @interface ParametersAreNullableByDefault
+ + +

+This annotation can be applied to a package, class or method to indicate that + the method parameters in that element are nullable by default unless there is: +

+

This annotation implies the same "nullness" as no annotation. However, it is different + than having no annotation, as it is inherited and it can override a ParametersAreNonnullByDefault + annotation at an outer scope. +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/PropertyKey.html b/javadoc/javax/annotation/PropertyKey.html new file mode 100644 index 0000000..c1588aa --- /dev/null +++ b/javadoc/javax/annotation/PropertyKey.html @@ -0,0 +1,197 @@ + + + + + + +PropertyKey + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type PropertyKey

+
+
+
@Documented
+@TypeQualifier
+@Retention(value=RUNTIME)
+public @interface PropertyKey
+ + +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ Whenwhen + +
+           
+  +

+

+when

+
+public abstract When when
+
+
+
+
+
+
+
+
Default:
ALWAYS
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/RegEx.Checker.html b/javadoc/javax/annotation/RegEx.Checker.html new file mode 100644 index 0000000..fb5d802 --- /dev/null +++ b/javadoc/javax/annotation/RegEx.Checker.html @@ -0,0 +1,265 @@ + + + + + + +RegEx.Checker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Class RegEx.Checker

+
+java.lang.Object
+  extended by javax.annotation.RegEx.Checker
+
+
+
All Implemented Interfaces:
TypeQualifierValidator<RegEx>
+
+
+
Enclosing class:
RegEx
+
+
+
+
public static class RegEx.Checker
extends java.lang.Object
implements TypeQualifierValidator<RegEx>
+ + +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
RegEx.Checker() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ WhenforConstantValue(RegEx annotation, + java.lang.Object value) + +
+          Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+RegEx.Checker

+
+public RegEx.Checker()
+
+
+ + + + + + + + +
+Method Detail
+ +

+forConstantValue

+
+public When forConstantValue(RegEx annotation,
+                             java.lang.Object value)
+
+
Description copied from interface: TypeQualifierValidator
+
Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier. +

+

+
Specified by:
forConstantValue in interface TypeQualifierValidator<RegEx>
+
+
+
Parameters:
annotation - the type qualifier
value - the value to check +
Returns:
a value indicating whether or not the value is an member of the + values denoted by the type qualifier
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/RegEx.html b/javadoc/javax/annotation/RegEx.html new file mode 100644 index 0000000..110c75a --- /dev/null +++ b/javadoc/javax/annotation/RegEx.html @@ -0,0 +1,203 @@ + + + + + + +RegEx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type RegEx

+
+
+
@Documented
+@Syntax(value="RegEx")
+@TypeQualifierNickname
+@Retention(value=RUNTIME)
+public @interface RegEx
+ + +

+This qualifier is used to denote String values that should be a Regular + expression. +

+ +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ Whenwhen + +
+           
+  +

+

+when

+
+public abstract When when
+
+
+
+
+
+
+
+
Default:
ALWAYS
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Signed.html b/javadoc/javax/annotation/Signed.html new file mode 100644 index 0000000..5aee8d3 --- /dev/null +++ b/javadoc/javax/annotation/Signed.html @@ -0,0 +1,170 @@ + + + + + + +Signed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Signed

+
+
+
@Documented
+@TypeQualifierNickname
+@Nonnegative(when=UNKNOWN)
+@Retention(value=RUNTIME)
+public @interface Signed
+ + +

+Used to annotate a value of unknown sign +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Syntax.html b/javadoc/javax/annotation/Syntax.html new file mode 100644 index 0000000..7604f62 --- /dev/null +++ b/javadoc/javax/annotation/Syntax.html @@ -0,0 +1,261 @@ + + + + + + +Syntax + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Syntax

+
+
+
@Documented
+@TypeQualifier(applicableTo=java.lang.String.class)
+@Retention(value=RUNTIME)
+public @interface Syntax
+ + +

+This annotation a value that is of a particular syntax, such as Java syntax + or regular expression syntax. This can be used to provide syntax checking of + constant values at compile time, run time checking at runtime, and can assist + IDEs in deciding how to interpret String constants (e.g., should a + refactoring that renames method x() to y() update the String constant "x()"). +

+ +

+


+ +

+ + + + + + + + + + + +
+Required Element Summary
+ java.lang.Stringvalue + +
+          Value indicating the particular syntax denoted by this annotation.
+ + + + + + + + + + +
+Optional Element Summary
+ Whenwhen + +
+           
+  +

+ + + + + + + + +
+Element Detail
+ +

+value

+
+public abstract java.lang.String value
+
+
Value indicating the particular syntax denoted by this annotation. + Different tools will recognize different syntaxes, but some proposed + canonical values are: +
    +
  • "Java" +
  • "RegEx" +
  • "JavaScript" +
  • "Ruby" +
  • "Groovy" +
  • "SQL" +
  • "FormatString" +
+ + Syntax names can be followed by a colon and a list of key value pairs, + separated by commas. For example, "SQL:dialect=Oracle,version=2.3". Tools + should ignore any keys they don't recognize. +

+

+
+
+
+
+
+

+when

+
+public abstract When when
+
+
+
+
+
+
+
+
Default:
ALWAYS
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Tainted.html b/javadoc/javax/annotation/Tainted.html new file mode 100644 index 0000000..e7fc905 --- /dev/null +++ b/javadoc/javax/annotation/Tainted.html @@ -0,0 +1,166 @@ + + + + + + +Tainted + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Tainted

+
+
+
@Documented
+@TypeQualifierNickname
+@Untainted(when=MAYBE)
+@Retention(value=RUNTIME)
+public @interface Tainted
+ + +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/Untainted.html b/javadoc/javax/annotation/Untainted.html new file mode 100644 index 0000000..72c22a7 --- /dev/null +++ b/javadoc/javax/annotation/Untainted.html @@ -0,0 +1,197 @@ + + + + + + +Untainted + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type Untainted

+
+
+
@Documented
+@TypeQualifier
+@Retention(value=RUNTIME)
+public @interface Untainted
+ + +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ Whenwhen + +
+           
+  +

+

+when

+
+public abstract When when
+
+
+
+
+
+
+
+
Default:
ALWAYS
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/WillClose.html b/javadoc/javax/annotation/WillClose.html new file mode 100644 index 0000000..b0f8f29 --- /dev/null +++ b/javadoc/javax/annotation/WillClose.html @@ -0,0 +1,164 @@ + + + + + + +WillClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type WillClose

+
+
+
@Documented
+@Retention(value=RUNTIME)
+public @interface WillClose
+ + +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/WillCloseWhenClosed.html b/javadoc/javax/annotation/WillCloseWhenClosed.html new file mode 100644 index 0000000..8a33962 --- /dev/null +++ b/javadoc/javax/annotation/WillCloseWhenClosed.html @@ -0,0 +1,164 @@ + + + + + + +WillCloseWhenClosed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type WillCloseWhenClosed

+
+
+
@Documented
+@Retention(value=RUNTIME)
+public @interface WillCloseWhenClosed
+ + +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/WillNotClose.html b/javadoc/javax/annotation/WillNotClose.html new file mode 100644 index 0000000..5ba038d --- /dev/null +++ b/javadoc/javax/annotation/WillNotClose.html @@ -0,0 +1,164 @@ + + + + + + +WillNotClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation +
+Annotation Type WillNotClose

+
+
+
@Documented
+@Retention(value=RUNTIME)
+public @interface WillNotClose
+ + +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/concurrent/GuardedBy.html b/javadoc/javax/annotation/concurrent/GuardedBy.html new file mode 100644 index 0000000..05113e9 --- /dev/null +++ b/javadoc/javax/annotation/concurrent/GuardedBy.html @@ -0,0 +1,224 @@ + + + + + + +GuardedBy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.concurrent +
+Annotation Type GuardedBy

+
+
+
@Target(value={FIELD,METHOD})
+@Retention(value=CLASS)
+public @interface GuardedBy
+ + +

+GuardedBy + + The field or method to which this annotation is applied can only be accessed + when holding a particular lock, which may be a built-in (synchronization) + lock, or may be an explicit java.util.concurrent.Lock. + + The argument determines which lock guards the annotated field or method: this : + The string literal "this" means that this field is guarded by the class in + which it is defined. class-name.this : For inner classes, it may be necessary + to disambiguate 'this'; the class-name.this designation allows you to specify + which 'this' reference is intended itself : For reference fields only; the + object to which the field refers. field-name : The lock object is referenced + by the (instance or static) field specified by field-name. + class-name.field-name : The lock object is reference by the static field + specified by class-name.field-name. method-name() : The lock object is + returned by calling the named nil-ary method. class-name.class : The Class + object for the specified class should be used as the lock object. +

+ +

+


+ +

+ + + + + + + + + + + +
+Required Element Summary
+ java.lang.Stringvalue + +
+           
+  +

+ + + + + + + + +
+Element Detail
+ +

+value

+
+public abstract java.lang.String value
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/concurrent/Immutable.html b/javadoc/javax/annotation/concurrent/Immutable.html new file mode 100644 index 0000000..7cb099a --- /dev/null +++ b/javadoc/javax/annotation/concurrent/Immutable.html @@ -0,0 +1,182 @@ + + + + + + +Immutable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.concurrent +
+Annotation Type Immutable

+
+
+
@Documented
+@Target(value=TYPE)
+@Retention(value=CLASS)
+public @interface Immutable
+ + +

+Immutable + + The class to which this annotation is applied is immutable. This means that + its state cannot be seen to change by callers. Of necessity this means that + all public fields are final, and that all public final reference fields refer + to other immutable objects, and that methods do not publish references to any + internal state which is mutable by implementation even if not by design. + Immutable objects may still have internal mutable state for purposes of + performance optimization; some state variables may be lazily computed, so + long as they are computed from immutable state and that callers cannot tell + the difference. + + Immutable objects are inherently thread-safe; they may be passed between + threads or published without synchronization. +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/concurrent/NotThreadSafe.html b/javadoc/javax/annotation/concurrent/NotThreadSafe.html new file mode 100644 index 0000000..e50513c --- /dev/null +++ b/javadoc/javax/annotation/concurrent/NotThreadSafe.html @@ -0,0 +1,176 @@ + + + + + + +NotThreadSafe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.concurrent +
+Annotation Type NotThreadSafe

+
+
+
@Documented
+@Target(value=TYPE)
+@Retention(value=CLASS)
+public @interface NotThreadSafe
+ + +

+NotThreadSafe + + The class to which this annotation is applied is not thread-safe. This + annotation primarily exists for clarifying the non-thread-safety of a class + that might otherwise be assumed to be thread-safe, despite the fact that it + is a bad idea to assume a class is thread-safe without good reason. +

+ +

+

+
See Also:
ThreadSafe
+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/concurrent/ThreadSafe.html b/javadoc/javax/annotation/concurrent/ThreadSafe.html new file mode 100644 index 0000000..76769ca --- /dev/null +++ b/javadoc/javax/annotation/concurrent/ThreadSafe.html @@ -0,0 +1,175 @@ + + + + + + +ThreadSafe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.concurrent +
+Annotation Type ThreadSafe

+
+
+
@Documented
+@Target(value=TYPE)
+@Retention(value=CLASS)
+public @interface ThreadSafe
+ + +

+ThreadSafe + + The class to which this annotation is applied is thread-safe. This means that + no sequences of accesses (reads and writes to public fields, calls to public + methods) may put the object into an invalid state, regardless of the + interleaving of those actions by the runtime, and without requiring any + additional synchronization or coordination on the part of the caller. +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/concurrent/package-frame.html b/javadoc/javax/annotation/concurrent/package-frame.html new file mode 100644 index 0000000..3765c5c --- /dev/null +++ b/javadoc/javax/annotation/concurrent/package-frame.html @@ -0,0 +1,38 @@ + + + + + + +javax.annotation.concurrent + + + + + + + + + + + +javax.annotation.concurrent + + + + +
+Annotation Types  + +
+GuardedBy +
+Immutable +
+NotThreadSafe +
+ThreadSafe
+ + + + diff --git a/javadoc/javax/annotation/concurrent/package-summary.html b/javadoc/javax/annotation/concurrent/package-summary.html new file mode 100644 index 0000000..06328f1 --- /dev/null +++ b/javadoc/javax/annotation/concurrent/package-summary.html @@ -0,0 +1,174 @@ + + + + + + +javax.annotation.concurrent + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package javax.annotation.concurrent +

+ + + + + + + + + + + + + + + + + + + + + +
+Annotation Types Summary
GuardedByGuardedBy + + The field or method to which this annotation is applied can only be accessed + when holding a particular lock, which may be a built-in (synchronization) + lock, or may be an explicit java.util.concurrent.Lock.
ImmutableImmutable + + The class to which this annotation is applied is immutable.
NotThreadSafeNotThreadSafe + + The class to which this annotation is applied is not thread-safe.
ThreadSafeThreadSafe + + The class to which this annotation is applied is thread-safe.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/concurrent/package-tree.html b/javadoc/javax/annotation/concurrent/package-tree.html new file mode 100644 index 0000000..34a3c1d --- /dev/null +++ b/javadoc/javax/annotation/concurrent/package-tree.html @@ -0,0 +1,149 @@ + + + + + + +javax.annotation.concurrent Class Hierarchy + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package javax.annotation.concurrent +

+
+
+
Package Hierarchies:
All Packages
+
+

+Annotation Type Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/Exclusive.html b/javadoc/javax/annotation/meta/Exclusive.html new file mode 100644 index 0000000..042dc7e --- /dev/null +++ b/javadoc/javax/annotation/meta/Exclusive.html @@ -0,0 +1,185 @@ + + + + + + +Exclusive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.meta +
+Annotation Type Exclusive

+
+
+
@Documented
+@Retention(value=RUNTIME)
+public @interface Exclusive
+ + +

+This annotation can be applied to the value() element of an annotation that + is annotated as a TypeQualifier. + + For example, the following defines a type qualifier such that if you know a + value is @Foo(1), then the value cannot be @Foo(2) or {@Foo(3). + +<<<<<<< .mine + For example, the following defines a type qualifier such that if you know + a value is &#064;Foo(1), then the value cannot be &#064;Foo(2) + or {&#064;Foo(3). + +======= +>>>>>>> .r47 + + @TypeQualifier @interface Foo { + @Exclusive int value(); + } + +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/Exhaustive.html b/javadoc/javax/annotation/meta/Exhaustive.html new file mode 100644 index 0000000..1cdf1b4 --- /dev/null +++ b/javadoc/javax/annotation/meta/Exhaustive.html @@ -0,0 +1,194 @@ + + + + + + +Exhaustive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.meta +
+Annotation Type Exhaustive

+
+
+
@Documented
+@Retention(value=RUNTIME)
+public @interface Exhaustive
+ + +

+This annotation can be applied to the value() element of an annotation that + is annotated as a TypeQualifier. This is only appropriate if the value field + returns a value that is an Enumeration. + + Applications of the type qualifier with different values are exclusive, and + the enumeration is an exhaustive list of the possible values. + +<<<<<<< .mine + For example, the following defines a type qualifier such that if you know + a value is neither &#064;Foo(Color.Red) or &#064;Foo(Color.Blue), then the value must be + &#064;Foo(Color.Green). And if you know it is &#064;Foo(Color.Green), you know it cannot + be &#064;Foo(Color.Red) or &#064;Foo(Color.Blue) + +======= + For example, the following defines a type qualifier such that if you know a + value is neither @Foo(Color.Red) or @Foo(Color.Blue), + then the value must be @Foo(Color.Green). And if you know it is + @Foo(Color.Green), you know it cannot be + @Foo(Color.Red) or @Foo(Color.Blue) + +>>>>>>> .r47 + + @TypeQualifier @interface Foo { + enum Color {RED, BLUE, GREEN}; + @Exhaustive Color value(); + } + +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/TypeQualifier.html b/javadoc/javax/annotation/meta/TypeQualifier.html new file mode 100644 index 0000000..7e9fe73 --- /dev/null +++ b/javadoc/javax/annotation/meta/TypeQualifier.html @@ -0,0 +1,207 @@ + + + + + + +TypeQualifier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.meta +
+Annotation Type TypeQualifier

+
+
+
@Documented
+@Target(value=ANNOTATION_TYPE)
+@Retention(value=RUNTIME)
+public @interface TypeQualifier
+ + +

+This qualifier is applied to an annotation to denote that the annotation + should be treated as a type qualifier. +

+ +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ java.lang.Class<?>applicableTo + +
+          Describes the kinds of values the qualifier can be applied to.
+  +

+

+applicableTo

+
+public abstract java.lang.Class<?> applicableTo
+
+
Describes the kinds of values the qualifier can be applied to. If a + numeric class is provided (e.g., Number.class or Integer.class) then the + annotation can also be applied to the corresponding primitive numeric + types. +

+

+
+
+
+
+
+
Default:
java.lang.Object.class
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/TypeQualifierDefault.html b/javadoc/javax/annotation/meta/TypeQualifierDefault.html new file mode 100644 index 0000000..5e0917c --- /dev/null +++ b/javadoc/javax/annotation/meta/TypeQualifierDefault.html @@ -0,0 +1,203 @@ + + + + + + +TypeQualifierDefault + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.meta +
+Annotation Type TypeQualifierDefault

+
+
+
@Documented
+@Target(value=ANNOTATION_TYPE)
+@Retention(value=RUNTIME)
+public @interface TypeQualifierDefault
+ + +

+This qualifier is applied to an annotation to denote that the annotation + defines a default type qualifier that is visible within the scope of the + element it is applied to. +

+ +

+


+ +

+ + + + + + + + + + + +
+Optional Element Summary
+ java.lang.annotation.ElementType[]value + +
+           
+  +

+

+value

+
+public abstract java.lang.annotation.ElementType[] value
+
+
+
+
+
+
+
+
Default:
{}
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/TypeQualifierNickname.html b/javadoc/javax/annotation/meta/TypeQualifierNickname.html new file mode 100644 index 0000000..5bb40f5 --- /dev/null +++ b/javadoc/javax/annotation/meta/TypeQualifierNickname.html @@ -0,0 +1,184 @@ + + + + + + +TypeQualifierNickname + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.meta +
+Annotation Type TypeQualifierNickname

+
+
+
@Documented
+@Target(value=ANNOTATION_TYPE)
+public @interface TypeQualifierNickname
+ + +

+This annotation is applied to a annotation, and marks the annotation as being + a qualifier nickname. Applying a nickname annotation X to a element Y should + be interpreted as having the same meaning as applying all of annotations of X + (other than QualifierNickname) to Y. + +

+ Thus, you might define a qualifier SocialSecurityNumber as follows: +

+ + + + @Documented + @TypeQualifierNickname @Pattern("[0-9]{3}-[0-9]{2}-[0-9]{4}") + @Retention(RetentionPolicy.RUNTIME) + public @interface SocialSecurityNumber { + } + +

+ +

+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/TypeQualifierValidator.html b/javadoc/javax/annotation/meta/TypeQualifierValidator.html new file mode 100644 index 0000000..209ea16 --- /dev/null +++ b/javadoc/javax/annotation/meta/TypeQualifierValidator.html @@ -0,0 +1,214 @@ + + + + + + +TypeQualifierValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.meta +
+Interface TypeQualifierValidator<A extends java.lang.annotation.Annotation>

+
+
All Known Implementing Classes:
MatchesPattern.Checker, Nonnegative.Checker, Nonnull.Checker, RegEx.Checker
+
+
+
+
public interface TypeQualifierValidator<A extends java.lang.annotation.Annotation>
+ + +

+


+ +

+ + + + + + + + + + + + +
+Method Summary
+ WhenforConstantValue(A annotation, + java.lang.Object value) + +
+          Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier.
+  +

+ + + + + + + + +
+Method Detail
+ +

+forConstantValue

+
+@Nonnull
+When forConstantValue(@Nonnull
+                              A annotation,
+                              java.lang.Object value)
+
+
Given a type qualifier, check to see if a known specific constant value + is an instance of the set of values denoted by the qualifier. +

+

+
Parameters:
annotation - the type qualifier
value - the value to check +
Returns:
a value indicating whether or not the value is an member of the + values denoted by the type qualifier
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/When.html b/javadoc/javax/annotation/meta/When.html new file mode 100644 index 0000000..f5ef57a --- /dev/null +++ b/javadoc/javax/annotation/meta/When.html @@ -0,0 +1,365 @@ + + + + + + +When + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +javax.annotation.meta +
+Enum When

+
+java.lang.Object
+  extended by java.lang.Enum<When>
+      extended by javax.annotation.meta.When
+
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<When>
+
+
+
+
public enum When
extends java.lang.Enum<When>
+ + +

+Used to describe the relationship between a qualifier T and the set of values + S possible on an annotated element. + + In particular, an issues should be reported if an ALWAYS or MAYBE value is + used where a NEVER value is required, or if a NEVER or MAYBE value is used + where an ALWAYS value is required. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + +
+Enum Constant Summary
ALWAYS + +
+          S is a subset of T
MAYBE + +
+          S intersection T is non empty and S - T is nonempty
NEVER + +
+          S intersection T is empty
UNKNOWN + +
+          nothing definitive is known about the relation between S and T
+  + + + + + + + + + + + + + + + +
+Method Summary
+static WhenvalueOf(java.lang.String name) + +
+          Returns the enum constant of this type with the specified name.
+static When[]values() + +
+          Returns an array containing the constants of this enum type, in +the order they're declared.
+ + + + + + + +
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
+ + + + + + + +
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Enum Constant Detail
+ +

+ALWAYS

+
+public static final When ALWAYS
+
+
S is a subset of T +

+

+
+
+
+ +

+UNKNOWN

+
+public static final When UNKNOWN
+
+
nothing definitive is known about the relation between S and T +

+

+
+
+
+ +

+MAYBE

+
+public static final When MAYBE
+
+
S intersection T is non empty and S - T is nonempty +

+

+
+
+
+ +

+NEVER

+
+public static final When NEVER
+
+
S intersection T is empty +

+

+
+
+ + + + + + + + +
+Method Detail
+ +

+values

+
+public static final When[] values()
+
+
Returns an array containing the constants of this enum type, in +the order they're declared. This method may be used to iterate +over the constants as follows: +
+for(When c : When.values())
+        System.out.println(c);
+
+

+

+ +
Returns:
an array containing the constants of this enum type, in +the order they're declared
+
+
+
+ +

+valueOf

+
+public static When valueOf(java.lang.String name)
+
+
Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.) +

+

+
Parameters:
name - the name of the enum constant to be returned. +
Returns:
the enum constant with the specified name +
Throws: +
java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/package-frame.html b/javadoc/javax/annotation/meta/package-frame.html new file mode 100644 index 0000000..427d5e3 --- /dev/null +++ b/javadoc/javax/annotation/meta/package-frame.html @@ -0,0 +1,62 @@ + + + + + + +javax.annotation.meta + + + + + + + + + + + +javax.annotation.meta + + + + +
+Interfaces  + +
+TypeQualifierValidator
+ + + + + + +
+Enums  + +
+When
+ + + + + + +
+Annotation Types  + +
+Exclusive +
+Exhaustive +
+TypeQualifier +
+TypeQualifierDefault +
+TypeQualifierNickname
+ + + + diff --git a/javadoc/javax/annotation/meta/package-summary.html b/javadoc/javax/annotation/meta/package-summary.html new file mode 100644 index 0000000..df450ff --- /dev/null +++ b/javadoc/javax/annotation/meta/package-summary.html @@ -0,0 +1,203 @@ + + + + + + +javax.annotation.meta + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package javax.annotation.meta +

+ + + + + + + + + +
+Interface Summary
TypeQualifierValidator<A extends Annotation> 
+  + +

+ + + + + + + + + +
+Enum Summary
WhenUsed to describe the relationship between a qualifier T and the set of values + S possible on an annotated element.
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+Annotation Types Summary
ExclusiveThis annotation can be applied to the value() element of an annotation that + is annotated as a TypeQualifier.
ExhaustiveThis annotation can be applied to the value() element of an annotation that + is annotated as a TypeQualifier.
TypeQualifierThis qualifier is applied to an annotation to denote that the annotation + should be treated as a type qualifier.
TypeQualifierDefaultThis qualifier is applied to an annotation to denote that the annotation + defines a default type qualifier that is visible within the scope of the + element it is applied to.
TypeQualifierNicknameThis annotation is applied to a annotation, and marks the annotation as being + a qualifier nickname.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/meta/package-tree.html b/javadoc/javax/annotation/meta/package-tree.html new file mode 100644 index 0000000..3f69c91 --- /dev/null +++ b/javadoc/javax/annotation/meta/package-tree.html @@ -0,0 +1,165 @@ + + + + + + +javax.annotation.meta Class Hierarchy + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package javax.annotation.meta +

+
+
+
Package Hierarchies:
All Packages
+
+

+Interface Hierarchy +

+ +

+Annotation Type Hierarchy +

+ +

+Enum Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/package-frame.html b/javadoc/javax/annotation/package-frame.html new file mode 100644 index 0000000..4c8ffbb --- /dev/null +++ b/javadoc/javax/annotation/package-frame.html @@ -0,0 +1,87 @@ + + + + + + +javax.annotation + + + + + + + + + + + +javax.annotation + + + + +
+Classes  + +
+MatchesPattern.Checker +
+Nonnegative.Checker +
+Nonnull.Checker +
+RegEx.Checker
+ + + + + + +
+Annotation Types  + +
+CheckForNull +
+CheckForSigned +
+CheckReturnValue +
+Detainted +
+MatchesPattern +
+Nonnegative +
+Nonnull +
+Nullable +
+OverridingMethodsMustInvokeSuper +
+ParametersAreNonnullByDefault +
+ParametersAreNullableByDefault +
+PropertyKey +
+RegEx +
+Signed +
+Syntax +
+Tainted +
+Untainted +
+WillClose +
+WillCloseWhenClosed +
+WillNotClose
+ + + + diff --git a/javadoc/javax/annotation/package-summary.html b/javadoc/javax/annotation/package-summary.html new file mode 100644 index 0000000..b71ce63 --- /dev/null +++ b/javadoc/javax/annotation/package-summary.html @@ -0,0 +1,276 @@ + + + + + + +javax.annotation + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package javax.annotation +

+ + + + + + + + + + + + + + + + + + + + + +
+Class Summary
MatchesPattern.Checker 
Nonnegative.Checker 
Nonnull.Checker 
RegEx.Checker 
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Annotation Types Summary
CheckForNull 
CheckForSignedUsed to annotate a value that may be either negative or nonnegative, and + indicates that uses of it should check for + negative values before using it in a way that requires the value to be + nonnegative, and check for it being nonnegative before using it in a way that + requires it to be negative.
CheckReturnValue 
Detainted 
MatchesPattern 
NonnegativeUsed to annotate a value that should only contain nonnegative values
Nonnull 
Nullable 
OverridingMethodsMustInvokeSuperWhen this annotation is applied to a method, it indicates that if this method + is overridden in a subclass, the overriding method should invoke this method + (through method invocation on super).
ParametersAreNonnullByDefaultThis annotation can be applied to a package, class or method to indicate that + the method parameters in that element are nonnull by default unless there is: + + An explicit nullness annotation + The method overrides a method in a superclass (in which case the + annotation of the corresponding parameter in the superclass applies) + there is a default parameter annotation applied to a more tightly nested + element.
ParametersAreNullableByDefaultThis annotation can be applied to a package, class or method to indicate that + the method parameters in that element are nullable by default unless there is: + + An explicit nullness annotation + The method overrides a method in a superclass (in which case the + annotation of the corresponding parameter in the superclass applies) + there is a default parameter annotation applied to a more tightly nested + element.
PropertyKey 
RegExThis qualifier is used to denote String values that should be a Regular + expression.
SignedUsed to annotate a value of unknown sign
SyntaxThis annotation a value that is of a particular syntax, such as Java syntax + or regular expression syntax.
Tainted 
Untainted 
WillClose 
WillCloseWhenClosed 
WillNotClose 
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/javax/annotation/package-tree.html b/javadoc/javax/annotation/package-tree.html new file mode 100644 index 0000000..f29daa8 --- /dev/null +++ b/javadoc/javax/annotation/package-tree.html @@ -0,0 +1,176 @@ + + + + + + +javax.annotation Class Hierarchy + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package javax.annotation +

+
+
+
Package Hierarchies:
All Packages
+
+

+Class Hierarchy +

+ +

+Annotation Type Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/overview-frame.html b/javadoc/overview-frame.html new file mode 100644 index 0000000..7ef028f --- /dev/null +++ b/javadoc/overview-frame.html @@ -0,0 +1,46 @@ + + + + + + +Overview + + + + + + + + + + + + + + + +
+
+ + + + + +
All Classes +

+ +Packages +
+javax.annotation +
+javax.annotation.concurrent +
+javax.annotation.meta +
+

+ +

+  + + diff --git a/javadoc/overview-summary.html b/javadoc/overview-summary.html new file mode 100644 index 0000000..9cbfc0c --- /dev/null +++ b/javadoc/overview-summary.html @@ -0,0 +1,159 @@ + + + + + + +Overview + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +


+
+

+JSR305 Documentation : Annotations for Software Defect Detection +

+
+ + + + + + + + + + + + + + + + + +
+Packages
javax.annotation 
javax.annotation.concurrent 
javax.annotation.meta 
+ +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/overview-tree.html b/javadoc/overview-tree.html new file mode 100644 index 0000000..aef98db --- /dev/null +++ b/javadoc/overview-tree.html @@ -0,0 +1,199 @@ + + + + + + +Class Hierarchy + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For All Packages

+
+
+
Package Hierarchies:
javax.annotation, javax.annotation.concurrent, javax.annotation.meta
+
+

+Class Hierarchy +

+ +

+Interface Hierarchy +

+ +

+Annotation Type Hierarchy +

+ +

+Enum Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + diff --git a/javadoc/package-list b/javadoc/package-list new file mode 100644 index 0000000..cc08202 --- /dev/null +++ b/javadoc/package-list @@ -0,0 +1,3 @@ +javax.annotation +javax.annotation.concurrent +javax.annotation.meta diff --git a/javadoc/resources/inherit.gif b/javadoc/resources/inherit.gif new file mode 100644 index 0000000..c814867 Binary files /dev/null and b/javadoc/resources/inherit.gif differ diff --git a/javadoc/stylesheet.css b/javadoc/stylesheet.css new file mode 100644 index 0000000..6d31fdb --- /dev/null +++ b/javadoc/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ +.TableRowColor { background: #FFFFFF } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..dcafc07 --- /dev/null +++ b/pom.xml @@ -0,0 +1,37 @@ + + + + 4.0.0 + + org.jsr-305 + jsr-305 + 0.1-SNAPSHOT + http://code.google.com/p/jsr-305/ + pom + JSR 305: Annotations for Software Defect Detection in Java + Master Maven project for all JSR 305 projects + + + + ri + tcl + sampleUses + proposedAnnotations + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + + + diff --git a/proposedAnnotations/pom.xml b/proposedAnnotations/pom.xml new file mode 100644 index 0000000..831ae27 --- /dev/null +++ b/proposedAnnotations/pom.xml @@ -0,0 +1,19 @@ + + + + 4.0.0 + + org.jsr-305 + jsr-305 + 0.1-SNAPSHOT + + + org.jsr-305 + proposedAnnotations + jar + JSR 305 Proposed Annotations + 0.1-SNAPSHOT + Proposed Annotations for JSR-305 + diff --git a/ri/.classpath b/ri/.classpath new file mode 100644 index 0000000..b0f1c60 --- /dev/null +++ b/ri/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/ri/.project b/ri/.project new file mode 100644 index 0000000..4855f3b --- /dev/null +++ b/ri/.project @@ -0,0 +1,17 @@ + + + JSR305-ri + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/ri/.settings/org.eclipse.jdt.core.prefs b/ri/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..1bb83fc --- /dev/null +++ b/ri/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Wed Jun 20 13:34:34 GMT-05:00 2007 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/ri/.settings/org.eclipse.jdt.ui.prefs b/ri/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..f1d942c --- /dev/null +++ b/ri/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,3 @@ +#Wed Jun 20 13:34:34 GMT-05:00 2007 +eclipse.preferences.version=1 +internal.default.compliance=default diff --git a/ri/LICENSE b/ri/LICENSE new file mode 100644 index 0000000..6736681 --- /dev/null +++ b/ri/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2007-2009, JSR305 expert group +All rights reserved. + +http://www.opensource.org/licenses/bsd-license.php + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the JSR305 expert group nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/ri/build.xml b/ri/build.xml new file mode 100644 index 0000000..ad07dec --- /dev/null +++ b/ri/build.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ri/nbproject/project.xml b/ri/nbproject/project.xml new file mode 100644 index 0000000..e4a7852 --- /dev/null +++ b/ri/nbproject/project.xml @@ -0,0 +1,78 @@ + + + org.netbeans.modules.ant.freeform + + + JSR305-ri + + + + JSR305-ri + + + + + java + src/main/java + UTF-8 + + + + java + src/main/resources + UTF-8 + + + + . + UTF-8 + + + + + build + + + clean + + + clean + build + + + + folder + build + build + + + + + + src/main/java + + + + src/main/resources + + + build.xml + + + + + + + + + + + + src/main/java + src/main/resources + build + 1.5 + + + + diff --git a/ri/pom.xml b/ri/pom.xml new file mode 100644 index 0000000..becde96 --- /dev/null +++ b/ri/pom.xml @@ -0,0 +1,20 @@ + + + + 4.0.0 + + org.jsr-305 + jsr-305 + 0.1-SNAPSHOT + + + org.jsr-305 + ri + jar + JSR 305 Implementation + 0.1-SNAPSHOT + Implementation for JSR-305 + + + diff --git a/ri/src/main/java/javax/annotation/CheckForNull.java b/ri/src/main/java/javax/annotation/CheckForNull.java new file mode 100644 index 0000000..6fe5200 --- /dev/null +++ b/ri/src/main/java/javax/annotation/CheckForNull.java @@ -0,0 +1,16 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.When; + +@Documented +@TypeQualifierNickname +@Nonnull(when = When.MAYBE) +@Retention(RetentionPolicy.RUNTIME) +public @interface CheckForNull { + +} diff --git a/ri/src/main/java/javax/annotation/CheckForSigned.java b/ri/src/main/java/javax/annotation/CheckForSigned.java new file mode 100644 index 0000000..f3bc597 --- /dev/null +++ b/ri/src/main/java/javax/annotation/CheckForSigned.java @@ -0,0 +1,24 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.When; + +/** + * Used to annotate a value that may be either negative or nonnegative, and + * indicates that uses of it should check for + * negative values before using it in a way that requires the value to be + * nonnegative, and check for it being nonnegative before using it in a way that + * requires it to be negative. + */ + +@Documented +@TypeQualifierNickname +@Nonnegative(when = When.MAYBE) +@Retention(RetentionPolicy.RUNTIME) +public @interface CheckForSigned { + +} diff --git a/ri/src/main/java/javax/annotation/CheckReturnValue.java b/ri/src/main/java/javax/annotation/CheckReturnValue.java new file mode 100644 index 0000000..370fa38 --- /dev/null +++ b/ri/src/main/java/javax/annotation/CheckReturnValue.java @@ -0,0 +1,17 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import javax.annotation.meta.When; + +@Documented +@Target( { ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE, + ElementType.PACKAGE }) +@Retention(RetentionPolicy.RUNTIME) +public @interface CheckReturnValue { + When when() default When.ALWAYS; +} diff --git a/ri/src/main/java/javax/annotation/Detainted.java b/ri/src/main/java/javax/annotation/Detainted.java new file mode 100644 index 0000000..d8620f2 --- /dev/null +++ b/ri/src/main/java/javax/annotation/Detainted.java @@ -0,0 +1,16 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.When; + +@Documented +@TypeQualifierNickname +@Untainted(when = When.ALWAYS) +@Retention(RetentionPolicy.RUNTIME) +public @interface Detainted { + +} diff --git a/ri/src/main/java/javax/annotation/MatchesPattern.java b/ri/src/main/java/javax/annotation/MatchesPattern.java new file mode 100644 index 0000000..775d21c --- /dev/null +++ b/ri/src/main/java/javax/annotation/MatchesPattern.java @@ -0,0 +1,30 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.util.regex.Pattern; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.TypeQualifierValidator; +import javax.annotation.meta.When; + +@Documented +@TypeQualifier(applicableTo = String.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface MatchesPattern { + @RegEx + String value(); + + int flags() default 0; + + static class Checker implements TypeQualifierValidator { + public When forConstantValue(MatchesPattern annotation, Object value) { + Pattern p = Pattern.compile(annotation.value(), annotation.flags()); + if (p.matcher(((String) value)).matches()) + return When.ALWAYS; + return When.NEVER; + } + + } +} diff --git a/ri/src/main/java/javax/annotation/Nonnegative.java b/ri/src/main/java/javax/annotation/Nonnegative.java new file mode 100644 index 0000000..21d1793 --- /dev/null +++ b/ri/src/main/java/javax/annotation/Nonnegative.java @@ -0,0 +1,41 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.TypeQualifierValidator; +import javax.annotation.meta.When; + +/** Used to annotate a value that should only contain nonnegative values */ +@Documented +@TypeQualifier(applicableTo = Number.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface Nonnegative { + When when() default When.ALWAYS; + + class Checker implements TypeQualifierValidator { + + public When forConstantValue(Nonnegative annotation, Object v) { + if (!(v instanceof Number)) + return When.NEVER; + boolean isNegative; + Number value = (Number) v; + if (value instanceof Long) + isNegative = value.longValue() < 0; + else if (value instanceof Double) + isNegative = value.doubleValue() < 0; + else if (value instanceof Float) + isNegative = value.floatValue() < 0; + else + isNegative = value.intValue() < 0; + + if (isNegative) + return When.NEVER; + else + return When.ALWAYS; + + } + } +} diff --git a/ri/src/main/java/javax/annotation/Nonnull.java b/ri/src/main/java/javax/annotation/Nonnull.java new file mode 100644 index 0000000..4b7aad9 --- /dev/null +++ b/ri/src/main/java/javax/annotation/Nonnull.java @@ -0,0 +1,26 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.TypeQualifierValidator; +import javax.annotation.meta.When; + +@Documented +@TypeQualifier +@Retention(RetentionPolicy.RUNTIME) +public @interface Nonnull { + When when() default When.ALWAYS; + + static class Checker implements TypeQualifierValidator { + + public When forConstantValue(Nonnull qualifierqualifierArgument, + Object value) { + if (value == null) + return When.NEVER; + return When.ALWAYS; + } + } +} diff --git a/ri/src/main/java/javax/annotation/Nullable.java b/ri/src/main/java/javax/annotation/Nullable.java new file mode 100644 index 0000000..d31993d --- /dev/null +++ b/ri/src/main/java/javax/annotation/Nullable.java @@ -0,0 +1,16 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.When; + +@Documented +@TypeQualifierNickname +@Nonnull(when = When.UNKNOWN) +@Retention(RetentionPolicy.RUNTIME) +public @interface Nullable { + +} diff --git a/ri/src/main/java/javax/annotation/OverridingMethodsMustInvokeSuper.java b/ri/src/main/java/javax/annotation/OverridingMethodsMustInvokeSuper.java new file mode 100644 index 0000000..4e3344e --- /dev/null +++ b/ri/src/main/java/javax/annotation/OverridingMethodsMustInvokeSuper.java @@ -0,0 +1,20 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * When this annotation is applied to a method, it indicates that if this method + * is overridden in a subclass, the overriding method should invoke this method + * (through method invocation on super). + * + */ +@Documented +@Target( { ElementType.METHOD }) +@Retention(RetentionPolicy.RUNTIME) +public @interface OverridingMethodsMustInvokeSuper { + +} diff --git a/ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java b/ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java new file mode 100644 index 0000000..6424b87 --- /dev/null +++ b/ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java @@ -0,0 +1,27 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierDefault; + +/** + * This annotation can be applied to a package, class or method to indicate that + * the method parameters in that element are nonnull by default unless there is: + *
    + *
  • An explicit nullness annotation + *
  • The method overrides a method in a superclass (in which case the + * annotation of the corresponding parameter in the superclass applies) + *
  • there is a default parameter annotation applied to a more tightly nested + * element. + *
+ * + */ +@Documented +@Nonnull +@TypeQualifierDefault(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface ParametersAreNonnullByDefault { +} diff --git a/ri/src/main/java/javax/annotation/ParametersAreNullableByDefault.java b/ri/src/main/java/javax/annotation/ParametersAreNullableByDefault.java new file mode 100644 index 0000000..01d4d80 --- /dev/null +++ b/ri/src/main/java/javax/annotation/ParametersAreNullableByDefault.java @@ -0,0 +1,30 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierDefault; + +/** + * This annotation can be applied to a package, class or method to indicate that + * the method parameters in that element are nullable by default unless there is: + *
    + *
  • An explicit nullness annotation + *
  • The method overrides a method in a superclass (in which case the + * annotation of the corresponding parameter in the superclass applies) + *
  • there is a default parameter annotation applied to a more tightly nested + * element. + *
+ *

This annotation implies the same "nullness" as no annotation. However, it is different + * than having no annotation, as it is inherited and it can override a ParametersAreNonnullByDefault + * annotation at an outer scope. + * + */ +@Documented +@Nullable +@TypeQualifierDefault(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface ParametersAreNullableByDefault { +} diff --git a/ri/src/main/java/javax/annotation/PropertyKey.java b/ri/src/main/java/javax/annotation/PropertyKey.java new file mode 100644 index 0000000..780782d --- /dev/null +++ b/ri/src/main/java/javax/annotation/PropertyKey.java @@ -0,0 +1,15 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.When; + +@Documented +@TypeQualifier +@Retention(RetentionPolicy.RUNTIME) +public @interface PropertyKey { + When when() default When.ALWAYS; +} diff --git a/ri/src/main/java/javax/annotation/RegEx.java b/ri/src/main/java/javax/annotation/RegEx.java new file mode 100644 index 0000000..21697a7 --- /dev/null +++ b/ri/src/main/java/javax/annotation/RegEx.java @@ -0,0 +1,42 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.TypeQualifierValidator; +import javax.annotation.meta.When; + +/** + * This qualifier is used to denote String values that should be a Regular + * expression. + * + */ +@Documented +@Syntax("RegEx") +@TypeQualifierNickname +@Retention(RetentionPolicy.RUNTIME) +public @interface RegEx { + When when() default When.ALWAYS; + + static class Checker implements TypeQualifierValidator { + + public When forConstantValue(RegEx annotation, Object value) { + if (!(value instanceof String)) + return When.NEVER; + + try { + Pattern.compile((String) value); + } catch (PatternSyntaxException e) { + return When.NEVER; + } + return When.ALWAYS; + + } + + } + +} diff --git a/ri/src/main/java/javax/annotation/Signed.java b/ri/src/main/java/javax/annotation/Signed.java new file mode 100644 index 0000000..2c2fa06 --- /dev/null +++ b/ri/src/main/java/javax/annotation/Signed.java @@ -0,0 +1,18 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.When; + +/** Used to annotate a value of unknown sign */ + +@Documented +@TypeQualifierNickname +@Nonnegative(when = When.UNKNOWN) +@Retention(RetentionPolicy.RUNTIME) +public @interface Signed { + +} diff --git a/ri/src/main/java/javax/annotation/Syntax.java b/ri/src/main/java/javax/annotation/Syntax.java new file mode 100644 index 0000000..5491093 --- /dev/null +++ b/ri/src/main/java/javax/annotation/Syntax.java @@ -0,0 +1,44 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.When; + +/** + * This annotation a value that is of a particular syntax, such as Java syntax + * or regular expression syntax. This can be used to provide syntax checking of + * constant values at compile time, run time checking at runtime, and can assist + * IDEs in deciding how to interpret String constants (e.g., should a + * refactoring that renames method x() to y() update the String constant "x()"). + * + * + */ +@Documented +@TypeQualifier(applicableTo = String.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface Syntax { + /** + * Value indicating the particular syntax denoted by this annotation. + * Different tools will recognize different syntaxes, but some proposed + * canonical values are: + *

    + *
  • "Java" + *
  • "RegEx" + *
  • "JavaScript" + *
  • "Ruby" + *
  • "Groovy" + *
  • "SQL" + *
  • "FormatString" + *
+ * + * Syntax names can be followed by a colon and a list of key value pairs, + * separated by commas. For example, "SQL:dialect=Oracle,version=2.3". Tools + * should ignore any keys they don't recognize. + */ + String value(); + + When when() default When.ALWAYS; +} diff --git a/ri/src/main/java/javax/annotation/Tainted.java b/ri/src/main/java/javax/annotation/Tainted.java new file mode 100644 index 0000000..6715d70 --- /dev/null +++ b/ri/src/main/java/javax/annotation/Tainted.java @@ -0,0 +1,16 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.When; + +@Documented +@TypeQualifierNickname +@Untainted(when = When.MAYBE) +@Retention(RetentionPolicy.RUNTIME) +public @interface Tainted { + +} diff --git a/ri/src/main/java/javax/annotation/Untainted.java b/ri/src/main/java/javax/annotation/Untainted.java new file mode 100644 index 0000000..4a26a49 --- /dev/null +++ b/ri/src/main/java/javax/annotation/Untainted.java @@ -0,0 +1,15 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.When; + +@Documented +@TypeQualifier +@Retention(RetentionPolicy.RUNTIME) +public @interface Untainted { + When when() default When.ALWAYS; +} diff --git a/ri/src/main/java/javax/annotation/WillClose.java b/ri/src/main/java/javax/annotation/WillClose.java new file mode 100644 index 0000000..9ea70cf --- /dev/null +++ b/ri/src/main/java/javax/annotation/WillClose.java @@ -0,0 +1,15 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +/** + * Used to annotate a method parameter to indicate that this method will close + * the resource. + */ +public @interface WillClose { + +} diff --git a/ri/src/main/java/javax/annotation/WillCloseWhenClosed.java b/ri/src/main/java/javax/annotation/WillCloseWhenClosed.java new file mode 100644 index 0000000..13c927d --- /dev/null +++ b/ri/src/main/java/javax/annotation/WillCloseWhenClosed.java @@ -0,0 +1,15 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +/** + * Used to annotate a constructor/factory parameter to indicate that returned + * object (X) will close the resource when X is closed. + */ +public @interface WillCloseWhenClosed { + +} diff --git a/ri/src/main/java/javax/annotation/WillNotClose.java b/ri/src/main/java/javax/annotation/WillNotClose.java new file mode 100644 index 0000000..d698b7c --- /dev/null +++ b/ri/src/main/java/javax/annotation/WillNotClose.java @@ -0,0 +1,15 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Documented +@Retention(RetentionPolicy.RUNTIME) +/** + * Used to annotate a method parameter to indicate that this method will not + * close the resource. + */ +public @interface WillNotClose { + +} diff --git a/ri/src/main/java/javax/annotation/concurrent/GuardedBy.java b/ri/src/main/java/javax/annotation/concurrent/GuardedBy.java new file mode 100644 index 0000000..9d6641d --- /dev/null +++ b/ri/src/main/java/javax/annotation/concurrent/GuardedBy.java @@ -0,0 +1,38 @@ +package javax.annotation.concurrent; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/* + * Copyright (c) 2005 Brian Goetz + * Released under the Creative Commons Attribution License + * (http://creativecommons.org/licenses/by/2.5) + * Official home: http://www.jcip.net + */ + +/** + * GuardedBy + * + * The field or method to which this annotation is applied can only be accessed + * when holding a particular lock, which may be a built-in (synchronization) + * lock, or may be an explicit java.util.concurrent.Lock. + * + * The argument determines which lock guards the annotated field or method: this : + * The string literal "this" means that this field is guarded by the class in + * which it is defined. class-name.this : For inner classes, it may be necessary + * to disambiguate 'this'; the class-name.this designation allows you to specify + * which 'this' reference is intended itself : For reference fields only; the + * object to which the field refers. field-name : The lock object is referenced + * by the (instance or static) field specified by field-name. + * class-name.field-name : The lock object is reference by the static field + * specified by class-name.field-name. method-name() : The lock object is + * returned by calling the named nil-ary method. class-name.class : The Class + * object for the specified class should be used as the lock object. + */ +@Target( { ElementType.FIELD, ElementType.METHOD }) +@Retention(RetentionPolicy.CLASS) +public @interface GuardedBy { + String value(); +} diff --git a/ri/src/main/java/javax/annotation/concurrent/Immutable.java b/ri/src/main/java/javax/annotation/concurrent/Immutable.java new file mode 100644 index 0000000..03f1cb5 --- /dev/null +++ b/ri/src/main/java/javax/annotation/concurrent/Immutable.java @@ -0,0 +1,36 @@ +package javax.annotation.concurrent; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/* + * Copyright (c) 2005 Brian Goetz + * Released under the Creative Commons Attribution License + * (http://creativecommons.org/licenses/by/2.5) + * Official home: http://www.jcip.net + */ + +/** + * Immutable + * + * The class to which this annotation is applied is immutable. This means that + * its state cannot be seen to change by callers. Of necessity this means that + * all public fields are final, and that all public final reference fields refer + * to other immutable objects, and that methods do not publish references to any + * internal state which is mutable by implementation even if not by design. + * Immutable objects may still have internal mutable state for purposes of + * performance optimization; some state variables may be lazily computed, so + * long as they are computed from immutable state and that callers cannot tell + * the difference. + * + * Immutable objects are inherently thread-safe; they may be passed between + * threads or published without synchronization. + */ +@Documented +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.CLASS) +public @interface Immutable { +} diff --git a/ri/src/main/java/javax/annotation/concurrent/NotThreadSafe.java b/ri/src/main/java/javax/annotation/concurrent/NotThreadSafe.java new file mode 100644 index 0000000..d948142 --- /dev/null +++ b/ri/src/main/java/javax/annotation/concurrent/NotThreadSafe.java @@ -0,0 +1,30 @@ +package javax.annotation.concurrent; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/* + * Copyright (c) 2005 Brian Goetz + * Released under the Creative Commons Attribution License + * (http://creativecommons.org/licenses/by/2.5) + * Official home: http://www.jcip.net + */ + +/** + * NotThreadSafe + * + * The class to which this annotation is applied is not thread-safe. This + * annotation primarily exists for clarifying the non-thread-safety of a class + * that might otherwise be assumed to be thread-safe, despite the fact that it + * is a bad idea to assume a class is thread-safe without good reason. + * + * @see ThreadSafe + */ +@Documented +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.CLASS) +public @interface NotThreadSafe { +} diff --git a/ri/src/main/java/javax/annotation/concurrent/ThreadSafe.java b/ri/src/main/java/javax/annotation/concurrent/ThreadSafe.java new file mode 100644 index 0000000..3c86128 --- /dev/null +++ b/ri/src/main/java/javax/annotation/concurrent/ThreadSafe.java @@ -0,0 +1,22 @@ +package javax.annotation.concurrent; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * ThreadSafe + * + * The class to which this annotation is applied is thread-safe. This means that + * no sequences of accesses (reads and writes to public fields, calls to public + * methods) may put the object into an invalid state, regardless of the + * interleaving of those actions by the runtime, and without requiring any + * additional synchronization or coordination on the part of the caller. + */ +@Documented +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.CLASS) +public @interface ThreadSafe { +} diff --git a/ri/src/main/java/javax/annotation/meta/Exclusive.java b/ri/src/main/java/javax/annotation/meta/Exclusive.java new file mode 100644 index 0000000..d018c33 --- /dev/null +++ b/ri/src/main/java/javax/annotation/meta/Exclusive.java @@ -0,0 +1,26 @@ +package javax.annotation.meta; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * This annotation can be applied to the value() element of an annotation that + * is annotated as a TypeQualifier. + * + * For example, the following defines a type qualifier such that if you know a + * value is {@literal @Foo(1)}, then the value cannot be {@literal @Foo(2)} or {{@literal @Foo(3)}. + * + * + * @TypeQualifier @interface Foo { + * @Exclusive int value(); + * } + * + * + */ + +@Documented +@Retention(RetentionPolicy.RUNTIME) +public @interface Exclusive { + +} diff --git a/ri/src/main/java/javax/annotation/meta/Exhaustive.java b/ri/src/main/java/javax/annotation/meta/Exhaustive.java new file mode 100644 index 0000000..dc75f06 --- /dev/null +++ b/ri/src/main/java/javax/annotation/meta/Exhaustive.java @@ -0,0 +1,33 @@ +package javax.annotation.meta; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * This annotation can be applied to the value() element of an annotation that + * is annotated as a TypeQualifier. This is only appropriate if the value field + * returns a value that is an Enumeration. + * + * Applications of the type qualifier with different values are exclusive, and + * the enumeration is an exhaustive list of the possible values. + * + * For example, the following defines a type qualifier such that if you know a + * value is neither {@literal @Foo(Color.Red)} or {@literal @Foo(Color.Blue)}, + * then the value must be {@literal @Foo(Color.Green)}. And if you know it is + * {@literal @Foo(Color.Green)}, you know it cannot be + * {@literal @Foo(Color.Red)} or {@literal @Foo(Color.Blue)} + * + * + * @TypeQualifier @interface Foo { + * enum Color {RED, BLUE, GREEN}; + * @Exhaustive Color value(); + * } + * + */ + +@Documented +@Retention(RetentionPolicy.RUNTIME) +public @interface Exhaustive { + +} diff --git a/ri/src/main/java/javax/annotation/meta/TypeQualifier.java b/ri/src/main/java/javax/annotation/meta/TypeQualifier.java new file mode 100644 index 0000000..99f6312 --- /dev/null +++ b/ri/src/main/java/javax/annotation/meta/TypeQualifier.java @@ -0,0 +1,27 @@ +package javax.annotation.meta; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * This qualifier is applied to an annotation to denote that the annotation + * should be treated as a type qualifier. + */ + +@Documented +@Target(ElementType.ANNOTATION_TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface TypeQualifier { + + /** + * Describes the kinds of values the qualifier can be applied to. If a + * numeric class is provided (e.g., Number.class or Integer.class) then the + * annotation can also be applied to the corresponding primitive numeric + * types. + */ + Class applicableTo() default Object.class; + +} diff --git a/ri/src/main/java/javax/annotation/meta/TypeQualifierDefault.java b/ri/src/main/java/javax/annotation/meta/TypeQualifierDefault.java new file mode 100644 index 0000000..0c8bd52 --- /dev/null +++ b/ri/src/main/java/javax/annotation/meta/TypeQualifierDefault.java @@ -0,0 +1,20 @@ +package javax.annotation.meta; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * This qualifier is applied to an annotation to denote that the annotation + * defines a default type qualifier that is visible within the scope of the + * element it is applied to. + */ + +@Documented +@Target(ElementType.ANNOTATION_TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface TypeQualifierDefault { + ElementType[] value() default {}; +} diff --git a/ri/src/main/java/javax/annotation/meta/TypeQualifierNickname.java b/ri/src/main/java/javax/annotation/meta/TypeQualifierNickname.java new file mode 100644 index 0000000..40c9983 --- /dev/null +++ b/ri/src/main/java/javax/annotation/meta/TypeQualifierNickname.java @@ -0,0 +1,33 @@ +package javax.annotation.meta; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** + * + * This annotation is applied to a annotation, and marks the annotation as being + * a qualifier nickname. Applying a nickname annotation X to a element Y should + * be interpreted as having the same meaning as applying all of annotations of X + * (other than QualifierNickname) to Y. + * + *

+ * Thus, you might define a qualifier SocialSecurityNumber as follows: + *

+ * + * + * + @Documented + @TypeQualifierNickname @Pattern("[0-9]{3}-[0-9]{2}-[0-9]{4}") + @Retention(RetentionPolicy.RUNTIME) + public @interface SocialSecurityNumber { + } + + * + * + */ +@Documented +@Target(ElementType.ANNOTATION_TYPE) +public @interface TypeQualifierNickname { + +} diff --git a/ri/src/main/java/javax/annotation/meta/TypeQualifierValidator.java b/ri/src/main/java/javax/annotation/meta/TypeQualifierValidator.java new file mode 100644 index 0000000..8053011 --- /dev/null +++ b/ri/src/main/java/javax/annotation/meta/TypeQualifierValidator.java @@ -0,0 +1,21 @@ +package javax.annotation.meta; + +import java.lang.annotation.Annotation; + +import javax.annotation.Nonnull; + +public interface TypeQualifierValidator { + /** + * Given a type qualifier, check to see if a known specific constant value + * is an instance of the set of values denoted by the qualifier. + * + * @param annotation + * the type qualifier + * @param value + * the value to check + * @return a value indicating whether or not the value is an member of the + * values denoted by the type qualifier + */ + public @Nonnull + When forConstantValue(@Nonnull A annotation, Object value); +} diff --git a/ri/src/main/java/javax/annotation/meta/When.java b/ri/src/main/java/javax/annotation/meta/When.java new file mode 100644 index 0000000..ec8a1bc --- /dev/null +++ b/ri/src/main/java/javax/annotation/meta/When.java @@ -0,0 +1,23 @@ +package javax.annotation.meta; + +/** + * Used to describe the relationship between a qualifier T and the set of values + * S possible on an annotated element. + * + * In particular, an issues should be reported if an ALWAYS or MAYBE value is + * used where a NEVER value is required, or if a NEVER or MAYBE value is used + * where an ALWAYS value is required. + * + * + */ +public enum When { + /** S is a subset of T */ + ALWAYS, + /** nothing definitive is known about the relation between S and T */ + UNKNOWN, + /** S intersection T is non empty and S - T is nonempty */ + MAYBE, + /** S intersection T is empty */ + NEVER; + +} diff --git a/sampleUses/.classpath b/sampleUses/.classpath new file mode 100644 index 0000000..f508c72 --- /dev/null +++ b/sampleUses/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sampleUses/.project b/sampleUses/.project new file mode 100644 index 0000000..bfe32bc --- /dev/null +++ b/sampleUses/.project @@ -0,0 +1,17 @@ + + + JSR305-uses + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/sampleUses/pom.xml b/sampleUses/pom.xml new file mode 100644 index 0000000..0199223 --- /dev/null +++ b/sampleUses/pom.xml @@ -0,0 +1,26 @@ + + + + 4.0.0 + + org.jsr-305 + jsr-305 + 0.1-SNAPSHOT + + + org.jsr-305 + sampleUses + jar + JSR 305 Sample Use Cases + 0.1-SNAPSHOT + Use Cases for JSR-305 + + + org.jsr-305 + ri + 0.1-SNAPSHOT + + + + diff --git a/sampleUses/src/main/java/CreditCardNumber.java b/sampleUses/src/main/java/CreditCardNumber.java new file mode 100644 index 0000000..ef5f711 --- /dev/null +++ b/sampleUses/src/main/java/CreditCardNumber.java @@ -0,0 +1,27 @@ +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.MatchesPattern; +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.TypeQualifierValidator; +import javax.annotation.meta.When; + +@Documented +@TypeQualifier +@MatchesPattern("[0-9]{16}") +@Retention(RetentionPolicy.RUNTIME) +public @interface CreditCardNumber { + class Checker implements TypeQualifierValidator { + + public When forConstantValue(CreditCardNumber annotation, Object v) { + if (!(v instanceof String)) + return When.NEVER; + String s = (String) v; + if (LuhnVerification.checkNumber(s)) + return When.ALWAYS; + return When.NEVER; + } + } +} diff --git a/sampleUses/src/main/java/FixedLengthString.java b/sampleUses/src/main/java/FixedLengthString.java new file mode 100644 index 0000000..bf7ba44 --- /dev/null +++ b/sampleUses/src/main/java/FixedLengthString.java @@ -0,0 +1,26 @@ +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.TypeQualifierValidator; +import javax.annotation.meta.When; + +@Documented +@TypeQualifier(applicableTo=String.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface FixedLengthString { + int value(); + + class Checker implements TypeQualifierValidator { + + public When forConstantValue(FixedLengthString annotation, Object v) { + if (!(v instanceof String)) + return When.NEVER; + String s = (String) v; + if (s.length() == annotation.value()) + return When.ALWAYS; + return When.NEVER; + } + } +} \ No newline at end of file diff --git a/sampleUses/src/main/java/LuhnVerification.java b/sampleUses/src/main/java/LuhnVerification.java new file mode 100644 index 0000000..f9ad241 --- /dev/null +++ b/sampleUses/src/main/java/LuhnVerification.java @@ -0,0 +1,26 @@ +public class LuhnVerification { + + static boolean checkNumber(String value) { + int result = 0; + boolean special = false; + for (int i = value.length() - 1; i >= 0; i--) { + int v = value.charAt(i) - '0'; + if (v < 0 || v > 9) + return false; + if (special) { + v = v * 2; + if (v > 9) + v = v - 10 + 1; + } + result += v; + special = !special; + } + System.out.println(result); + return result % 10 == 0; + } + + public static void main(String args[]) { + System.out.println(checkNumber("")); + } + +} diff --git a/sampleUses/src/main/java/SocialSecurityNumber.java b/sampleUses/src/main/java/SocialSecurityNumber.java new file mode 100644 index 0000000..a20c21b --- /dev/null +++ b/sampleUses/src/main/java/SocialSecurityNumber.java @@ -0,0 +1,14 @@ +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.MatchesPattern; +import javax.annotation.meta.TypeQualifierNickname; + +@Documented +@TypeQualifierNickname +@MatchesPattern("[0-9]{3}-[0-9]{2}-[0-9]{4}") +@Retention(RetentionPolicy.RUNTIME) +public @interface SocialSecurityNumber { +} diff --git a/sampleUses/src/main/java/edu/umd/cs/findbugs/DottedClassName.java b/sampleUses/src/main/java/edu/umd/cs/findbugs/DottedClassName.java new file mode 100644 index 0000000..f8779d0 --- /dev/null +++ b/sampleUses/src/main/java/edu/umd/cs/findbugs/DottedClassName.java @@ -0,0 +1,14 @@ +package edu.umd.cs.findbugs; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierNickname; +import javax.annotation.meta.When; + +@Documented +@SlashedClassName(when=When.NEVER) +@TypeQualifierNickname +@Retention(RetentionPolicy.RUNTIME) +public @interface DottedClassName { } \ No newline at end of file diff --git a/sampleUses/src/main/java/edu/umd/cs/findbugs/SlashedClassName.java b/sampleUses/src/main/java/edu/umd/cs/findbugs/SlashedClassName.java new file mode 100644 index 0000000..cc06384 --- /dev/null +++ b/sampleUses/src/main/java/edu/umd/cs/findbugs/SlashedClassName.java @@ -0,0 +1,15 @@ +package edu.umd.cs.findbugs; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; +import javax.annotation.meta.When; + +@Documented +@TypeQualifier(applicableTo=CharSequence.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface SlashedClassName { + When when() default When.ALWAYS; +} diff --git a/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/ParametersAreSlashedByDefault.java b/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/ParametersAreSlashedByDefault.java new file mode 100644 index 0000000..28e30e8 --- /dev/null +++ b/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/ParametersAreSlashedByDefault.java @@ -0,0 +1,13 @@ +package edu.umd.cs.findbugs.examples; + +import java.lang.annotation.ElementType; + +import javax.annotation.meta.TypeQualifierDefault; + +import edu.umd.cs.findbugs.SlashedClassName; + +@SlashedClassName +@TypeQualifierDefault(ElementType.PARAMETER) +public @interface ParametersAreSlashedByDefault { + +} diff --git a/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/Test.java b/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/Test.java new file mode 100644 index 0000000..1246131 --- /dev/null +++ b/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/Test.java @@ -0,0 +1,31 @@ +package edu.umd.cs.findbugs.examples; + +import javax.annotation.meta.When; + +import edu.umd.cs.findbugs.DottedClassName; +import edu.umd.cs.findbugs.SlashedClassName; + +public class Test { + + + public void foo(@SlashedClassName String foo) {} + + public void foo2(@DottedClassName String foo) { + foo(foo); // should get warning here + } + + public void foo3(String foo) { + foo(foo); + } + public void foo4(@DottedClassName String foo) { + foo3(foo); + } + + public void foo5(@SlashedClassName(when=When.MAYBE) String foo) { + foo(foo); + } + public void foo6(@SlashedClassName(when=When.UNKNOWN) String foo) { + foo(foo); + } +} + diff --git a/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/TestDefaults.java b/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/TestDefaults.java new file mode 100644 index 0000000..c6e8013 --- /dev/null +++ b/sampleUses/src/main/java/edu/umd/cs/findbugs/examples/TestDefaults.java @@ -0,0 +1,19 @@ +package edu.umd.cs.findbugs.examples; + +import javax.annotation.meta.When; + +import edu.umd.cs.findbugs.DottedClassName; +import edu.umd.cs.findbugs.SlashedClassName; + +@ParametersAreSlashedByDefault +public class TestDefaults { + public void foo(String c) {} + + public void foo2(@DottedClassName String c) { + foo(c); + } + + public void foo3(@SlashedClassName(when=When.UNKNOWN) String c) { + foo(c); + } +} diff --git a/sampleUses/src/main/java/java/sql/ResultSetConcurrency.java b/sampleUses/src/main/java/java/sql/ResultSetConcurrency.java new file mode 100644 index 0000000..418fa9e --- /dev/null +++ b/sampleUses/src/main/java/java/sql/ResultSetConcurrency.java @@ -0,0 +1,14 @@ +package java.sql; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; + +@Documented +@TypeQualifier(applicableTo=Integer.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface ResultSetConcurrency { + +} diff --git a/sampleUses/src/main/java/java/sql/ResultSetHoldability.java b/sampleUses/src/main/java/java/sql/ResultSetHoldability.java new file mode 100644 index 0000000..4bfdce2 --- /dev/null +++ b/sampleUses/src/main/java/java/sql/ResultSetHoldability.java @@ -0,0 +1,14 @@ +package java.sql; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; + +@Documented +@TypeQualifier(applicableTo=Integer.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface ResultSetHoldability { + +} diff --git a/sampleUses/src/main/java/java/sql/ResultSetType.java b/sampleUses/src/main/java/java/sql/ResultSetType.java new file mode 100644 index 0000000..888db2c --- /dev/null +++ b/sampleUses/src/main/java/java/sql/ResultSetType.java @@ -0,0 +1,14 @@ +package java.sql; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifier; + +@Documented +@TypeQualifier(applicableTo=Integer.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface ResultSetType { + +} diff --git a/tcl/pom.xml b/tcl/pom.xml new file mode 100644 index 0000000..36028b7 --- /dev/null +++ b/tcl/pom.xml @@ -0,0 +1,27 @@ + + + + 4.0.0 + + org.jsr-305 + jsr-305 + 0.1-SNAPSHOT + + + org.jsr-305 + tcl + jar + JSR 305 Test Cases + 0.1-SNAPSHOT + Test Cases for JSR-305 Implementations + + + + org.jsr-305 + ri + 0.1-SNAPSHOT + + + -- cgit v1.2.3