All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unitils.objectvalidation.rules.ClassIsFinalRule Maven / Gradle / Ivy

There is a newer version: 1.1.9
Show newest version

package org.unitils.objectvalidation.rules;

import static java.lang.reflect.Modifier.isFinal;
import static org.junit.Assert.assertTrue;

import org.unitils.objectvalidation.Rule;


/**
 * Rule to check that the class is final.
 * 
 * @author Matthieu Mestrez
 * @since Oct 24, 2013
 */
public class ClassIsFinalRule implements Rule {

    @Override
    public void validate(Class classToValidate) {
        assertTrue("Class was not final.", isFinal(classToValidate.getModifiers()));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy