001    /**
002     * $Id: GuardInitialization.java,v 1.1 2010/01/05 13:26:17 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 23.11.2008 by oliver (ob@oasd.de)
019     */
020    package patterntesting.runtime.annotation;
021    
022    import java.lang.annotation.*;
023    
024    /**
025     * If your static initialization fails and you get a NoClassDefFoundError
026     * use ths anntoation. Together with the InitializationAspect it will skip
027     * the errornous parts of the initialisation and log the errors.
028     * <br/>
029     * But there is another task for this annotation (together with the
030     * InitializationAspect): to avoid the run-on initialization bug
031     * (see {@link "http://www.ibm.com/developerwords/java/library/j-diag0416.html"})
032     * the attributes should be guarded. They should be all initialized after a
033     * constructor has been called.
034     *
035     * @{link "http://www.ibm.com/developerwords/java/library/j-diag0416.html"}
036     *
037     * @author <a href="boehm@javatux.de">oliver</a>
038     * @since 23.11.2008
039     * @version $Revision: 1.1 $
040     */
041    @Retention(RetentionPolicy.RUNTIME)
042    @Target({ElementType.CONSTRUCTOR, ElementType.TYPE})
043    public @interface GuardInitialization {
044    
045    }
046    
047    /**
048     * $Log: GuardInitialization.java,v $
049     * Revision 1.1  2010/01/05 13:26:17  oboehm
050     * begin with 1.0
051     *
052     * Revision 1.4  2009/12/19 22:34:09  oboehm
053     * trailing spaces removed
054     *
055     * Revision 1.3  2009/09/18 13:54:51  oboehm
056     * javadoc warnings fixed
057     *
058     * Revision 1.2  2009/05/08 20:41:08  oboehm
059     * https://sourceforge.net/support/tracker.php?aid=2786846 is fixed
060     *
061     * Revision 1.1  2008/11/23 21:42:04  oboehm
062     * static initialization can now be protected
063     * by @GuradInitialization annotation
064     *
065     * $Source: /cvsroot/patterntesting/PatternTesting10/patterntesting-rt/src/main/java/patterntesting/runtime/annotation/GuardInitialization.java,v $
066     */