org.codehaus.modello.generator.java.javasource
Class JNaming

java.lang.Object
  extended byorg.codehaus.modello.generator.java.javasource.JNaming

class JNaming
extends java.lang.Object

A utility class used to validate identifiers and class names

Version:
$Revision: 149 $ $Date: 2004-09-29 19:32:16 +0200 (Wed, 29 Sep 2004) $
Author:
Keith Visco

Field Summary
private static java.lang.String[] keywords
           
 
Constructor Summary
private JNaming()
           
 
Method Summary
static boolean isKeyword(java.lang.String name)
          Returns true if the given String is a Java keyword which will cause a problem when used as a variable name
static boolean isValidJavaIdentifier(java.lang.String string)
          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 Detail

keywords

private static final java.lang.String[] keywords
Constructor Detail

JNaming

private JNaming()
Method Detail

isKeyword

public static boolean isKeyword(java.lang.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(java.lang.String string)
Returns true if the given String matches the production of a valid Java identifier

Returns:
true if the given String matches the production of a valid Java name, otherwise false