org.codehaus.modello.plugin.java.javasource

Class JNaming

class JNaming extends Object

A utility class used to validate identifiers and class names

Version: $Revision: 555 $ $Date: 2006-01-29 16:38:08 -0500 (Sun, 29 Jan 2006) $

Author: Keith Visco

Method Summary
static booleanisKeyword(String name)
Returns true if the given String is a Java keyword which will cause a problem when used as a variable name
static booleanisValidJavaIdentifier(String string)
Returns true if the given String matches the production of a valid Java identifier

Method Detail

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

Copyright © 2001-2009 Codehaus. All Rights Reserved.