001    /**
002     * $Id: NotYetImplemented.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     * Eclipse and other tools will generate default implementation for you if you
026     * want to implement an interface. The problem with this implementation is
027     * that you must always overwrite this default implementation.
028     * <br/>
029     * To be able to mark these methods as "not yet finished" you can put this
030     * annotation in front of it. If you add a text this text is used for
031     * thrown UnsupportedOperationException. You can add "{0}" if you want to see
032     * the method name in the exception e.g.
033     * <code>@NotYetImplemented("don''t call {0} today")</code>.
034     * <br/>
035     * NOTE: a single quote must be written as "''" (see example above) because
036     * java.text.MessageFormat is used here for the error message.
037     * <br/>
038     * See patterntesting.sample.Fraction in PatternTesting Samples as an example
039     * how to use it.
040     *
041     * @see UnsupportedOperation
042     * @see java.text.MessageFormat
043     * @author <a href="boehm@javatux.de">oliver</a>
044     * @since 19.10.2008
045     * @version $Revision: 1.2 $
046     */
047    @Documented
048    @Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
049    @Retention(RetentionPolicy.RUNTIME)
050    public @interface NotYetImplemented {
051    
052        /**
053         * You can define the text here which is used for the thrown
054         * UnsupportedOperationException. You can add "{0}" if you want to see
055         * the method name in the exception e.g.
056         * <code>@NotYetImplemented("don''t call {0} today")</code>.
057         */
058        String value() default "{0} is not yet implemented";
059    }