List of usage examples for org.apache.commons.lang3.reflect TypeUtils containsTypeVariables
public static boolean containsTypeVariables(final Type type)
From source file:therian.Operation.java
private static boolean init(Class<?> type) { final boolean valid; synchronized (type) { if (VALID_INFO.containsKey(type)) { valid = VALID_INFO.get(type).booleanValue(); } else if (Modifier.isAbstract(type.getModifiers())) { valid = true;//from w w w .j av a2s . c om } else { final Type resultType = TypeUtils.unrollVariables(TypeUtils.getTypeArguments(type, Operation.class), TYPE_VARIABLE_RESULT); valid = !TypeUtils.containsTypeVariables(resultType); Validate.isTrue(valid, "%s does not fully bind type parameter %s from %s", type, TYPE_VARIABLE_RESULT.getName(), Operation.class); VALID_INFO.put(type, Boolean.valueOf(valid)); } } final Class<?> parent = type.getSuperclass(); if (!Operation.class.equals(parent)) { init(parent.asSubclass(Operation.class)); } return valid; }