1 23 package com.sun.enterprise.admin.util; 24 25 import com.sun.enterprise.admin.util.Validator; 26 27 import java.io.Serializable ; 29 30 31 34 public class BaseValidator implements Validator, Serializable 35 { 36 private final static String kMustBeNonNull = 37 "object must be non-null"; 38 39 private static final BaseValidator sInstance = new BaseValidator(); 40 41 49 public ValidatorResult validate( Object object ) 50 { 51 ValidatorResult result = ValidatorResult.kValid; 52 53 if ( object == null ) 54 { 55 result = new ValidatorResult( false, kMustBeNonNull ); 56 } 57 58 return( result ); 59 } 60 61 66 public static Validator getInstance() 67 { 68 return( sInstance ); 69 } 70 } | Popular Tags |