org.jtool.jxplatform.j2x
Class JavaIdentifier

java.lang.Object
  extended byorg.jtool.jxplatform.j2x.JavaIdentifier

public class JavaIdentifier
extends java.lang.Object

Stores reserved identifiers in Java programming language 5.0.

Author:
Katsuhisa Maruyama

Constructor Summary
JavaIdentifier()
           
 
Method Summary
static boolean isJavaKeyword(java.lang.String str)
          Tests if a string is defined as a Java's keyword.
static boolean isJavaSpecials(java.lang.String name)
          Tests if a string is defined as a Java's special token.
static boolean isValid(java.lang.String str)
          Tests if a string is valid according to the Java language specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaIdentifier

public JavaIdentifier()
Method Detail

isValid

public static boolean isValid(java.lang.String str)
Tests if a string is valid according to the Java language specification.

Parameters:
str - A string.
Returns:
true if the string is valid as an identifier, othereise false.

isJavaKeyword

public static boolean isJavaKeyword(java.lang.String str)
Tests if a string is defined as a Java's keyword.

Parameters:
str - A string.
Returns:
true if the string is one of the keywords, othereise false.

isJavaSpecials

public static boolean isJavaSpecials(java.lang.String name)
Tests if a string is defined as a Java's special token.

Parameters:
name - A string.
Returns:
true if the string is one of the special tokens, othereise false.