xsdlib.test.util.ResourceChecker Maven / Gradle / Ivy
/*
* @(#)$Id: ResourceChecker.java 1567 2003-06-09 20:50:21Z kk122374 $
*
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
package util;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Locale;
/**
* checks the existance of message resource.
*
* @author Kohsuke KAWAGUCHI
*/
public class ResourceChecker {
/**
* checks the existance of message resource.
*
* this method utilizes Java reflection to read values of
* "public static final String ERR_*****.
*
* @param prefix
* Fields whose name does not start with this prefix are not tested.
* Can be "".
*/
public static void check( Class cls, String prefix, Checker checker ) throws Exception {
Field[] fields = cls.getDeclaredFields();
for( int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy