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.constraint; 014 015 import net.sf.oval.ConstraintTarget; 016 import net.sf.oval.Validator; 017 import net.sf.oval.configuration.annotation.AbstractAnnotationCheck; 018 import net.sf.oval.context.OValContext; 019 020 /** 021 * @author Sebastian Thomschke 022 */ 023 public class AssertValidCheck extends AbstractAnnotationCheck<AssertValid> 024 { 025 private static final long serialVersionUID = 1L; 026 027 /** 028 * {@inheritDoc} 029 */ 030 @Override 031 protected ConstraintTarget[] getAppliesToDefault() 032 { 033 return new ConstraintTarget[]{ConstraintTarget.CONTAINER, ConstraintTarget.VALUES}; 034 } 035 036 /** 037 * <b>This method is not used.</b><br> 038 * The validation of this special constraint is directly performed by the Validator class 039 * @throws UnsupportedOperationException always thrown if this method is invoked 040 */ 041 public boolean isSatisfied(final Object validatedObject, final Object valueToValidate, final OValContext context, 042 final Validator validator) throws UnsupportedOperationException 043 { 044 throw new UnsupportedOperationException(); 045 } 046 }