View Javadoc
1   /*******************************************************************************
2    * Portions created by Sebastian Thomschke are copyright (c) 2005-2011 Sebastian
3    * Thomschke.
4    * 
5    * All Rights Reserved. This program and the accompanying materials
6    * are made available under the terms of the Eclipse Public License v1.0
7    * which accompanies this distribution, and is available at
8    * http://www.eclipse.org/legal/epl-v10.html
9    * 
10   * Contributors:
11   *     Sebastian Thomschke - initial implementation.
12   *******************************************************************************/
13  package net.sf.oval.constraint;
14  
15  import net.sf.oval.ConstraintTarget;
16  import net.sf.oval.Validator;
17  import net.sf.oval.configuration.annotation.AbstractAnnotationCheck;
18  import net.sf.oval.context.OValContext;
19  
20  /**
21   * @author Sebastian Thomschke
22   */
23  public class AssertValidCheck extends AbstractAnnotationCheck<AssertValid>
24  {
25  	private static final long serialVersionUID = 1L;
26  
27  	/**
28  	 * {@inheritDoc}
29  	 */
30  	@Override
31  	protected ConstraintTarget[] getAppliesToDefault()
32  	{
33  		return new ConstraintTarget[]{ConstraintTarget.CONTAINER, ConstraintTarget.VALUES};
34  	}
35  
36  	/**
37  	 *  <b>This method is not used.</b><br>
38  	 *  The validation of this special constraint is directly performed by the Validator class
39  	 *  @throws UnsupportedOperationException always thrown if this method is invoked
40  	 */
41  	public boolean isSatisfied(final Object validatedObject, final Object valueToValidate, final OValContext context,
42  			final Validator validator) throws UnsupportedOperationException
43  	{
44  		throw new UnsupportedOperationException();
45  	}
46  }