diff --git a/org.eclipse.xtext.util/src/org/eclipse/xtext/util/internal/Nullable.java b/org.eclipse.xtext.util/src/org/eclipse/xtext/util/internal/Nullable.java new file mode 100644 index 000000000..cd5e74b5a --- /dev/null +++ b/org.eclipse.xtext.util/src/org/eclipse/xtext/util/internal/Nullable.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2017 itemis AG (http://www.itemis.eu) 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 + *******************************************************************************/ +package org.eclipse.xtext.util.internal; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * This annotation is not intended to be used to do null analysis. + * The only purpose is to allow Google Guice to inject @Inject(optional=true) places with null instances. + * + * @author Christian Dietrich - Initial contribution and API + * + * @since 2.12 + */ +@Retention(RetentionPolicy.RUNTIME) +public @interface Nullable { + +}