/** * Returns the target class. It required, it also executes the * <clinit> class initialiser of the target class * * @return the initialised target class */ public static Class<?> getInitializedTargetClass() { return getTargetClass(true); }
/** * Returns the target class. If the class is not yet initialised, * this method *does not* execute the <clinit> class initialiser of the target class. * This method explicitly states that the <clinit> method is not executed * because of this method. * * @return the target class. The target class could be uninitialised */ public static Class<?> getTargetClassAndDontInitialise() { return getTargetClass(false); }
public static Class<?> getTargetClassRegression(boolean isOriginal){ if (isOriginal && TARGET_CLASS_INSTANCE != null && TARGET_CLASS_INSTANCE.getCanonicalName().equals(TARGET_CLASS)) return TARGET_CLASS_INSTANCE; else if(!isOriginal && TARGET_REGRESSION_CLASS_INSTANCE != null && TARGET_REGRESSION_CLASS_INSTANCE.getCanonicalName().equals(TARGET_CLASS)) return TARGET_REGRESSION_CLASS_INSTANCE; if(isOriginal) toReturnRegression = true; Class<?> targetClass = getTargetClass(true); toReturnRegression = false; return targetClass; }