001 /**
002 * $Id: NotNull.java,v 1.2 2013/11/29 14:23:30 oboehm Exp $
003 *
004 * Copyright (c) 2008 by Oliver Boehm
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 *
018 * (c)reated 06.12.2008 by oliver (ob@oasd.de)
019 */
020 package patterntesting.annotation.check.runtime;
021
022 import java.lang.annotation.*;
023
024 /**
025 * In contradiction to the NullPointerTrap which forbids all null arguments
026 * you can use a more relax strategy and mark only these parameter (and
027 * attributes) as "@NotNull" which should never be null.
028 * <br/>
029 * You can also mark fields with this annotation but this is at the moment not
030 * evaluated. But you can use it for documentation purposes.
031 * The same is true if you mark a method as @NotNull.
032 * <p>
033 * This annotation will be removed in 1.6.
034 * </p>
035 *
036 * @author <a href="boehm@javatux.de">oliver</a>
037 * @since 06.12.2008
038 * @version $Revision: 1.2 $
039 * @deprecated use javax.validation.constraints.NotNull
040 */
041 // TODO: remove me in 1.6
042 @Documented
043 @Retention(RetentionPolicy.RUNTIME)
044 @Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
045 @Deprecated
046 public @interface NotNull {
047
048 }