<commit_before>package de.skuzzle.enforcer.restrictimports.parser.lang;

import de.skuzzle.enforcer.restrictimports.parser.ImportStatement;

import java.util.List;
import java.util.Optional;
import java.util.ServiceLoader;
import java.util.Set;

/**
 * SPI for plugging in import statement recognition for different languages.
 * Implementations will be looked up using java's {@link ServiceLoader}.
 *
 * @author <NAME>
 */
public interface LanguageSupport {


    static Optional<LanguageSupport> getLanguageSupport(String extension) {
        return SupportedLanguageHolder.getLanguageSupport(extension);
    }

    static boolean isLanguageSupported(String extension) {
        return SupportedLanguageHolder.isLanguageSupported(extension);
    }<commit_msg>Add javadoc<commit_after>package de.skuzzle.enforcer.restrictimports.parser.lang;

import de.skuzzle.enforcer.restrictimports.parser.ImportStatement;

import java.util.List;
import java.util.Optional;
import java.util.ServiceLoader;
import java.util.Set;

/**
 * SPI for plugging in import statement recognition for different languages.
 * Implementations will be looked up using java's {@link ServiceLoader}.
 *
 * @author <NAME>
 */
public interface LanguageSupport {

    /**
     * Returns the {@link LanguageSupport} implementation for the given file
     * extension.
     *
     * @param extension The extension.
     * @return The {@link LanguageSupport} implementation or an empty optional
     * if none was found.
     */
    static Optional<LanguageSupport> getLanguageSupport(String extension) {
        return SupportedLanguageHolder.getLanguageSupport(extension);
    }

    /**
     * Determines whether there exists a {@link LanguageSupport} implementation for
     * the given extension.
     *
     * @param extension The extension.
     * @return Whether such implementation exists.
     */
    static boolean isLanguageSupported(String extension) {
        return SupportedLanguageHolder.isLanguageSupported(extension);
    }
{'fraction_non_alphanumeric': 0.08366533864541832, 'fraction_numerical': 0.0, 'mean_word_length': 4.0604534005037785, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1377214', 'n_tokens_mistral': 520, 'n_tokens_neox': 510, 'n_words': 145}