001 /**
002 * $Id: UnsupportedOperation.java,v 1.2 2010/06/08 21:32:53 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 19.10.2008 by oliver (ob@oasd.de)
019 */
020 package patterntesting.runtime.annotation;
021
022 import java.lang.annotation.*;
023
024 /**
025 * This is similar to the @NotYetImplemented annotation. The difference is
026 * only the semantic:
027 * "@UnsupportedOperation" means, it is not supported yet and the annotated
028 * method will probably also not supported in the future.
029 * "@NotYetImplemented" means, that the method is not yet implemented but will
030 * be available in the (near) future.
031 *
032 * @see NotYetImplemented
033 * @{link "patterntesting.sample.Fraction how to use it"}
034 * @see java.text.MessageFormat
035 * @author <a href="boehm@javatux.de">oliver</a>
036 * @since 19.10.2008
037 * @version $Revision: 1.2 $
038 */
039 @Documented
040 @Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
041 @Retention(RetentionPolicy.RUNTIME)
042 public @interface UnsupportedOperation {
043
044 /**
045 * You can define the text here which is used for the thrown
046 * UnsupportedOperationException. You can add "{0}" if you want to see
047 * the method name in the exception e.g.
048 * <code>@NotYetImplemented("don''t call {0} today")</code>.
049 */
050 String value() default "{0} is not supported";
051 }