All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mysema.codegen.support.ScalaSyntaxUtils Maven / Gradle / Ivy

package com.mysema.codegen.support;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public final class ScalaSyntaxUtils {

    private ScalaSyntaxUtils() {
    }

    private static final Set reserved = new HashSet(Arrays.asList("abstract", "do",
            "finally", "import", "object", "return", "trait", "var", "_", ":", "case", "else",
            "for", "lazy", "override", "sealed", "try", "while", "=", "=>", "<-", "catch",
            "extends", "forSome", "match", "package", "super", "true", "with", "<:", "class",
            "false", "if", "new", "private", "this", "type", "yield", "<%", ">:", "def", "final",
            "implicit", "null", "protected", "throw", "val", "#", "@"));

    public static boolean isReserved(String token) {
        return reserved.contains(token);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy