Coverage Report - org.simpleframework.xml.core.Validate
 
Classes in this File Line Coverage Branch Coverage Complexity
Validate
N/A
N/A
0
 
 1  
 /*
 2  
  * Validate.java July 2006
 3  
  *
 4  
  * Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net>
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 15  
  * implied. See the License for the specific language governing 
 16  
  * permissions and limitations under the License.
 17  
  */
 18  
 
 19  
 package org.simpleframework.xml.core;
 20  
 
 21  
 import java.lang.annotation.RetentionPolicy;
 22  
 import java.lang.annotation.Retention;
 23  
 
 24  
 /**
 25  
  * The <code>Validate</code> annotation is used to mark a method in
 26  
  * a serializable object that requires a callback from the persister
 27  
  * once the deserialization completes. The validate method is invoked
 28  
  * by the <code>Persister</code> after all fields have been assigned
 29  
  * and before the commit method is invoked.
 30  
  * <p>
 31  
  * Typically the validate method is used to validate the fields that
 32  
  * have been assigned once deserialization has been completed. The
 33  
  * validate method must be a no argument public method or a method
 34  
  * that takes a <code>Map</code> as the only argument. When invoked 
 35  
  * the object can determine whether the fields are valid, if the  
 36  
  * field values do not conform to the objects requirements then the
 37  
  * method can throw an exception to terminate deserialization.
 38  
  * 
 39  
  * @author Niall Gallagher
 40  
  * 
 41  
  * @see org.simpleframework.xml.core.Commit
 42  
  */
 43  
 @Retention(RetentionPolicy.RUNTIME)
 44  
 public @interface Validate {
 45  
 }