patterntesting.runtime.annotation
Annotation Type GuardInitialization


@Retention(value=RUNTIME)
@Target(value={CONSTRUCTOR,TYPE})
public @interface GuardInitialization

If your static initialization fails and you get a NoClassDefFoundError use ths anntoation. Together with the InitializationAspect it will skip the errornous parts of the initialisation and log the errors.
But there is another task for this annotation (together with the InitializationAspect): to avoid the run-on initialization bug (see "http://www.ibm.com/developerwords/java/library/j-diag0416.html") the attributes should be guarded. They should be all initialized after a constructor has been called.

Since:
23.11.2008
Version:
$Revision: 1.1 $
Author:
oliver



Copyright © 2002–2014 PatternTesting Team. All rights reserved.