1 19 20 package org.netbeans.modules.j2ee.persistence.dd; 21 22 import java.util.Arrays ; 23 import java.util.Set ; 24 import java.util.TreeSet ; 25 import org.openide.util.NbBundle; 26 27 33 public class JavaPersistenceQLKeywords { 34 35 private static Set <String > keywords ; 36 37 private JavaPersistenceQLKeywords() {} 38 39 static{ 40 String rawKeywords = NbBundle.getBundle(JavaPersistenceQLKeywords.class).getString("JavaPersistenceQLKeywords"); 41 keywords = new TreeSet <String >(Arrays.asList(rawKeywords.split(","))); } 43 44 public static boolean isKeyword(String string){ 45 if (string == null){ 46 throw new NullPointerException (); 47 } 48 49 boolean result = keywords.contains(string.toUpperCase()); 50 return result; 51 } 52 } 53 | Popular Tags |