draft of annotations for use by https://bugs.eclipse.org/bugs/show_bug.cgi?id=186342

diff --git a/contrib/jdt-null-annotations/.classpath b/contrib/jdt-null-annotations/.classpath
new file mode 100644
index 0000000..8727917
--- /dev/null
+++ b/contrib/jdt-null-annotations/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/contrib/jdt-null-annotations/.project b/contrib/jdt-null-annotations/.project
new file mode 100644
index 0000000..53ba8e4
--- /dev/null
+++ b/contrib/jdt-null-annotations/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jdt-null-annotations</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/contrib/jdt-null-annotations/.settings/org.eclipse.jdt.core.prefs b/contrib/jdt-null-annotations/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..5277d93
--- /dev/null
+++ b/contrib/jdt-null-annotations/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Sun Feb 27 13:49:35 CET 2011
+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/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NonNull.java b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NonNull.java
new file mode 100644
index 0000000..a6e01fa
--- /dev/null
+++ b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NonNull.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GK Software AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.jdt.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.*;
+ 
+/**
+ * <blockquote>
+ * This annotation is intended for use by the Eclipse Java Compiler in order to
+ * support intra-procedural null analysis. Please see the original 
+ * <a href="http://bugs.eclipse.org/bugs/186342">Bug 186342- [compiler][null] Using annotations for null checking</a> 
+ * and the <a href="http://wiki.eclipse.org/JDT_Core/Null_Analysis">Wiki page</a>
+ * for status and availability of the implementation of these analyses.
+ * </blockquote> 
+ * <p>
+ * Qualifier for a type in a method signature or a local variable declaration.
+ * The entity (return value, parameter, local variable) whose type has this
+ * annotation can never have the value <code>null</code> at runtime.
+ * <p>
+ * This has two consequences:
+ * <ul>
+ * <li>An attempt to bind a <code>null</code> value to the entity is a compile time error.
+ *     Diagnostics issued by the compiler should distinguish three situations:
+ *     <ul>
+ *     <li>Nullness of the value can be statically determined.</li>
+ *     <li>Nullness can not definitely be determined, because different code branches yield different results.</li>
+ *     <li>Nullness can not be determined, because other program elements are involved for which
+ *         null annotations are lacking.</li>
+ *     </ul></li>
+ * <li>Dereferencing the entity is safe, i.e., no <code>NullPointerException</code> can occur at runtime.</li>
+ * </ul>
+ * </p>
+ * @author stephan
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target({METHOD,PARAMETER,LOCAL_VARIABLE})
+public @interface NonNull {
+
+}
diff --git a/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NonNullByDefault.java b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NonNullByDefault.java
new file mode 100644
index 0000000..2f0d844
--- /dev/null
+++ b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NonNullByDefault.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GK Software AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.jdt.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.*;
+ 
+/**
+ * <blockquote>
+ * This annotation is intended for use by the Eclipse Java Compiler in order to
+ * support intra-procedural null analysis. Please see the original 
+ * <a href="http://bugs.eclipse.org/bugs/186342">Bug 186342- [compiler][null] Using annotations for null checking</a> 
+ * and the <a href="http://wiki.eclipse.org/JDT_Core/Null_Analysis">Wiki page</a>
+ * for status and availability of the implementation of these analyses.
+ * </blockquote> 
+ * <p>
+ * This annotation can be applied to a package or a type in order to define that
+ * all contained entities for which a null annotation is otherwise lacking
+ * should be considered as @{@link NonNull}.
+ * <dl>
+ * <dt>Interaction with inheritance</dt>
+ * <dd>This annotation has lower precedence than null contract inheritance,
+ * i.e., for a method with no explicit null annotations first inheritance
+ * from the super-method (overridden or implemented) are considered.
+ * Only if that search yields no null annotation the default defined using
+ * <code>@NonNullByDefault</code> is applied.</dd>
+ * <dt>Nested defaults</dt>
+ * <dd>If a <code>@NonNullByDefault</code>
+ * annotation is used within the scope of a <code>@NullableByDefault</code>
+ * annotation the inner most annotation defines the default applicable at 
+ * any given position.</dd>
+ * </dl>
+ * Note that for applying an annotation to a package a file by the name
+ * <code>package-info.java</code> is used.
+ * 
+ * @author stephan
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target({PACKAGE,TYPE})
+public @interface NonNullByDefault {
+
+}
diff --git a/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/Nullable.java b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/Nullable.java
new file mode 100644
index 0000000..7e93283
--- /dev/null
+++ b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/Nullable.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GK Software AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.jdt.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.*;
+ 
+/**
+ * <blockquote>
+ * This annotation is intended for use by the Eclipse Java Compiler in order to
+ * support intra-procedural null analysis. Please see the original 
+ * <a href="http://bugs.eclipse.org/bugs/186342">Bug 186342- [compiler][null] Using annotations for null checking</a> 
+ * and the <a href="http://wiki.eclipse.org/JDT_Core/Null_Analysis">Wiki page</a>
+ * for status and availability of the implementation of these analyses.
+ * </blockquote> 
+ * <p>
+ * Qualifier for a type in a method signature or a local variable declaration.
+ * The entity (return value, parameter, local variable) whose type has this
+ * annotation is allowed to have the value <code>null</code> at runtime.
+ * <p>
+ * This has two consequences:
+ * <ul>
+ * <li>Binding a <code>null</code> value to the entity is legal.</li>
+ * <li>Dereferencing the entity is unsafe, i.e., a <code>NullPointerException</code> can occur at runtime.</li>
+ * </ul>
+ * </p>
+ * @author stephan
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target({METHOD,PARAMETER,LOCAL_VARIABLE})
+public @interface Nullable {
+
+}
diff --git a/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NullableByDefault.java b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NullableByDefault.java
new file mode 100644
index 0000000..5e47006
--- /dev/null
+++ b/contrib/jdt-null-annotations/src/org/eclipse/jdt/annotation/NullableByDefault.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GK Software AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.jdt.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.*;
+ 
+/**
+ * <blockquote>
+ * This annotation is intended for use by the Eclipse Java Compiler in order to
+ * support intra-procedural null analysis. Please see the original 
+ * <a href="http://bugs.eclipse.org/bugs/186342">Bug 186342- [compiler][null] Using annotations for null checking</a> 
+ * and the <a href="http://wiki.eclipse.org/JDT_Core/Null_Analysis">Wiki page</a>
+ * for status and availability of the implementation of these analyses.
+ * </blockquote> 
+ * <p>
+ * This annotation can be applied to a package or a type in order to define that
+ * all contained entities for which a null annotation is otherwise lacking
+ * should be considered as @{@link Nullable}.
+ * <dl>
+ * <dt>Interaction with inheritance</dt>
+ * <dd>This annotation has lower precedence than null contract inheritance,
+ * i.e., for a method with no explicit null annotations first inheritance
+ * from the super-method (overridden or implemented) are considered.
+ * Only if that search yields no null annotation the default defined using
+ * <code>@NullableByDefault</code> is applied.</dd>
+ * <dt>Nested defaults</dt>
+ * <dd>If a <code>@NullableByDefault</code>
+ * annotation is used within the scope of a <code>@NonNullByDefault</code>
+ * annotation the inner most annotation defines the default applicable at 
+ * any given position.</dd>
+ * </dl>
+ * Note that for applying an annotation to a package a file by the name
+ * <code>package-info.java</code> is used.
+ * 
+ * @author stephan
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target({PACKAGE,TYPE})
+public @interface NullableByDefault {
+
+}