001 /******************************************************************************* 002 * Portions created by Sebastian Thomschke are copyright (c) 2005-2011 Sebastian 003 * Thomschke. 004 * 005 * All Rights Reserved. This program and the accompanying materials 006 * are made available under the terms of the Eclipse Public License v1.0 007 * which accompanies this distribution, and is available at 008 * http://www.eclipse.org/legal/epl-v10.html 009 * 010 * Contributors: 011 * Sebastian Thomschke - initial implementation. 012 *******************************************************************************/ 013 package net.sf.oval.guard; 014 015 import java.lang.annotation.Documented; 016 import java.lang.annotation.ElementType; 017 import java.lang.annotation.Retention; 018 import java.lang.annotation.RetentionPolicy; 019 import java.lang.annotation.Target; 020 021 /** 022 * Before the annotated method is executed all field and getter constraints 023 * (invariants) of this object are validated. 024 * 025 * If constraint violations occur, the annotated method will not be executed 026 * instead it will throw a ConstraintsViolatedException exception.<br> 027 * 028 * @author Sebastian Thomschke 029 */ 030 @Documented 031 @Retention(RetentionPolicy.RUNTIME) 032 @Target({ElementType.METHOD}) 033 public @interface PreValidateThis 034 { 035 // 036 }