} else { boolean inVerificationMode = isInVerificationMode(); if (WhiteboxImpl.isClass(obj) && inVerificationMode) { handleStaticVerification((Class<?>) obj);
/** * Gets the type. * * @param object the object * @return The type of the of an object. */ public static Class<?> getType(Object object) { Class<?> type = null; if (isClass(object)) { type = (Class<?>) object; } else if (object != null) { type = object.getClass(); } return type; }
/** * Gets the type. * * @param object * the object * @return The type of the of an object. */ public static Class<?> getType(Object object) { Class<?> type = null; if (isClass(object)) { type = (Class<?>) object; } else if (object != null) { type = object.getClass(); } return getUnmockedType(type); }
/** * Gets the type. * * @param object the object * @return The type of the of an object. */ public static Class<?> getUnproxyType(Object object) { Class<?> type = null; if (isClass(object)) { type = (Class<?>) object; } else if (object != null) { type = object.getClass(); } return type == null ? null : getOriginalUnmockedType(type); }
assignableFrom = parameterTypes[i].isAssignableFrom(argumentType); final boolean isClass = parameterTypes[i].equals(Class.class) && isClass(argument); if (!assignableFrom && !isClass) { return false;
public static void setInternalStateFromContext(Object object, Object context, FieldMatchingStrategy strategy) { if (isClass(context)) { copyState(object, getType(context), strategy); } else { copyState(object, context, strategy); } }
public static void setInternalStateFromContext(Object object, Object context, FieldMatchingStrategy strategy) { if (isClass(context)) { copyState(object, getType(context), strategy); } else { copyState(object, context, strategy); } }
Set<Field> allFields = isClass(context) ? getAllStaticFields(getType(context)) : getAllInstanceFields(context); for (Field field : allFields) { try {
Set<Field> allFields = isClass(context) ? getAllStaticFields(getType(context)) : getAllInstanceFields(context); for (Field field : allFields) { try {
boolean assignableFrom = WhiteboxImpl.isAssignableFrom(parameterTypes[i], WhiteboxImpl.getType( argument)); final boolean isClass = parameterTypes[i].equals(Class.class) && WhiteboxImpl.isClass(argument); if (!assignableFrom && !isClass) { return false;
final boolean isClass = parameterTypes[i].equals(Class.class) && isClass(argument); if (!assignableFrom && !isClass) { return false;
strategy.notFound(originalStartClass, !isClass(object));
strategy.notFound(originalStartClass, !isClass(object));
if (isClass(tested)) { testedType = (Class<?>) tested; } else {
if (isClass(tested)) { testedType = (Class<?>) tested; } else {