Class ReservedWords


  • public class ReservedWords
    extends java.lang.Object
    Utility to test validity of identifier or parameter name.
    Since:
    2.0.0
    Author:
    Pinaki Poddar
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Set<java.lang.String> KEYWORDS  
    • Constructor Summary

      Constructors 
      Constructor Description
      ReservedWords()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Character hasSpecialCharacter​(java.lang.String name)
      Returns the special character contained in the given name if any.
      static boolean isKeyword​(java.lang.String name)
      Affirms if the given string matches any of the JPA reserved words in a case-insensitive manner.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • KEYWORDS

        public static final java.util.Set<java.lang.String> KEYWORDS
    • Constructor Detail

      • ReservedWords

        public ReservedWords()
    • Method Detail

      • isKeyword

        public static boolean isKeyword​(java.lang.String name)
        Affirms if the given string matches any of the JPA reserved words in a case-insensitive manner.
      • hasSpecialCharacter

        public static java.lang.Character hasSpecialCharacter​(java.lang.String name)
        Returns the special character contained in the given name if any.
        Returns:
        null if no character in the given name is a special character.