String () { if (myRealStep.isHook()) { try { Field definitionMatchField = myRealStep.getClass().getSuperclass().getDeclaredField("definitionMatch"); definitionMatchField.setAccessible(true); Object definitionMatchFieldValue = definitionMatchField.get(myRealStep); Field hookDefinitionField = definitionMatchFieldValue.getClass().getDeclaredField("hookDefinition"); hookDefinitionField.setAccessible(true); Object hookDefinitionFieldValue = hookDefinitionField.get(definitionMatchFieldValue); Field methodField = hookDefinitionFieldValue.getClass().getDeclaredField("method"); methodField.setAccessible(true); Object methodFieldValue = methodField.get(hookDefinitionFieldValue); if (methodFieldValue instanceof Method) { Method method = (Method)methodFieldValue; return String.format("java:test://%s/%s", method.getDeclaringClass().getName(), method.getName()); } } catch (Exception ignored) { } return ""; } return FILE_RESOURCE_PREFIX + myRealStep.getStepLocation() + ":" + myRealStep.getStepLine(); }