@Override
    @SuppressWarnings("unchecked")
    public <M extends MemberScope<?, ?>> CustomPropertyDefinition getCustomDefinition(M scope, SchemaGenerationContext context,
            CustomPropertyDefinitionProvider<M> ignoredDefinitionProvider) {
        CustomPropertyDefinition result;
        if (scope instanceof FieldScope) {
            result = this.getCustomDefinition(this.fieldConfigPart, (FieldScope) scope, context,
                    (CustomPropertyDefinitionProvider<FieldScope>) ignoredDefinitionProvider);
        } else if (scope instanceof MethodScope) {
            result = this.getCustomDefinition(this.methodConfigPart, (MethodScope) scope, context,
                    (CustomPropertyDefinitionProvider<MethodScope>) ignoredDefinitionProvider);
        } else {
            throw new IllegalArgumentException("Unexpected member scope: " + (scope == null ? null : scope.getClass().getName()));
        }
        return result;
    }
Whether a given option is currently enabled (either specifically or by default).

@param setting generator option to check
@return whether the given generator option is enabled
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGeneratorConfigImpl.java