001 /*
002 * Copyright 2009-2016 UnboundID Corp.
003 * All Rights Reserved.
004 */
005 /*
006 * Copyright (C) 2009-2016 UnboundID Corp.
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021 package com.unboundid.util;
022
023
024
025 import java.lang.annotation.Documented;
026 import java.lang.annotation.ElementType;
027 import java.lang.annotation.Retention;
028 import java.lang.annotation.RetentionPolicy;
029 import java.lang.annotation.Target;
030
031
032
033 /**
034 * This annotation type is used to indicate that instances of the associated
035 * class may not be altered after they have been created. Note that this may or
036 * may not indicate strict immutability, as some classes marked with this
037 * annotation type may have their internal state altered in some way that is not
038 * externally visible. In addition, the following caveats must be observed for
039 * classes containing this annotation type, and for all other classes in the
040 * LDAP SDK:
041 * <UL>
042 * <LI>
043 * If an array is provided as an argument to a constructor or a method, then
044 * that array must not be referenced or altered by the caller at any time
045 * after that point unless it is clearly noted that it is acceptable to do
046 * so.
047 * <BR><BR>
048 * </LI>
049 *
050 * <LI>
051 * If an array is returned by a method, then the contents of that array must
052 * not be altered unless it is clearly noted that it is acceptable to do so.
053 * <BR><BR>
054 * </LI>
055 * </UL>
056 * <BR><BR>
057 * It will only be used for classes which are primarily used as data structures
058 * and will not be included in classes whose primary purpose is something other
059 * than as a data type. It will also not be used for interfaces, abstract
060 * classes, or enums.
061 * <BR><BR>
062 * This annotation type will appear in the generated Javadoc documentation for
063 * classes and interfaces that include it.
064 *
065 * @see Mutable
066 */
067 @Documented()
068 @Retention(RetentionPolicy.RUNTIME)
069 @Target({ ElementType.TYPE })
070 public @interface NotMutable
071 {
072 }