Example usage for org.apache.commons.lang3 Validate isAssignableFrom

List of usage examples for org.apache.commons.lang3 Validate isAssignableFrom

Introduction

In this page you can find the example usage for org.apache.commons.lang3 Validate isAssignableFrom.

Prototype

public static void isAssignableFrom(final Class<?> superType, final Class<?> type, final String message,
        final Object... values) 

Source Link

Document

Validates that the argument can be converted to the specified class, if not throws an exception.

Usage

From source file:org.datalorax.populace.core.populate.mutator.ensure.EnsureListElementsNotNullMutator.java

@SuppressWarnings("unchecked")
private static List<Object> ensureList(final Type type, final Object currentValue) {
    Validate.isAssignableFrom(List.class, TypeUtils.getRawType(type, null), "Unsupported type %s", type);
    return (List<Object>) currentValue;
}