private IMockabilityResult isMockable(IMockMaker mockMaker, IMockCreationSettings settings) {
    Set<MockMakerCapability> capabilities = mockMaker.getCapabilities();
    Class<?> mockType = settings.getMockType();
    if (mockType.isInterface() && !capabilities.contains(MockMakerCapability.INTERFACE)) {
      return MockMakerCapability.INTERFACE.notMockable();
    }
    if (!mockType.isInterface() && !capabilities.contains(MockMakerCapability.CLASS)) {
      return MockMakerCapability.CLASS.notMockable();
    }
    if (!settings.getAdditionalInterface().isEmpty() && !capabilities.contains(MockMakerCapability.ADDITIONAL_INTERFACES)) {
      return MockMakerCapability.ADDITIONAL_INTERFACES.notMockable();
    }
    if (settings.getConstructorArgs() != null && !capabilities.contains(MockMakerCapability.EXPLICIT_CONSTRUCTOR_ARGUMENTS)) {
      return MockMakerCapability.EXPLICIT_CONSTRUCTOR_ARGUMENTS.notMockable();
    }
    if (Modifier.isFinal(mockType.getModifiers()) && !capabilities.contains(MockMakerCapability.FINAL_CLASS)) {
      return MockMakerCapability.FINAL_CLASS.notMockable();
    }
    //Note MockMakerCapability.FINAL_METHOD is not testable here.
    if (settings.isStaticMock() && !capabilities.contains(MockMakerCapability.STATIC_METHOD)) {
      return MockMakerCapability.STATIC_METHOD.notMockable();
    }
    return mockMaker.getMockability(settings);
  }
Returns {@code true} if the passed class is a Spock static mock currently active on the current {@link Thread}.

@param clazz the class to check
@return {@code true} if this class is a Spock static mock currently active on the current {@code Thread}
spock-core/src/main/java/org/spockframework/mock/runtime/MockMakerRegistry.java