java.lang.Object
org.codehaus.modello.plugin.java.javasource.JNaming

class JNaming extends Object
A utility class used to validate identifiers and class names
Version:
$Revision$ $Date$
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String[]
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Returns true if the given String is a Java keyword which will cause a problem when used as a variable name
    static boolean
    Returns true if the given String matches the production of a valid Java identifier

    Methods inherited from class java.lang.Object

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

    • keywords

      private static final String[] keywords
  • Constructor Details

    • JNaming

      private JNaming()
  • Method Details

    • isKeyword

      public static boolean isKeyword(String name)
      Returns true if the given String is a Java keyword which will cause a problem when used as a variable name
    • isValidJavaIdentifier

      public static boolean isValidJavaIdentifier(String string)
      Returns true if the given String matches the production of a valid Java identifier
      Parameters:
      string - , the String to check the production of
      Returns:
      true if the given String matches the production of a valid Java name, otherwise false