com.intellij.lang.refactoring
Class JavaNamesValidator

java.lang.Object
  extended by com.intellij.lang.refactoring.JavaNamesValidator
All Implemented Interfaces:
NamesValidator

public class JavaNamesValidator
extends java.lang.Object
implements NamesValidator

Default NamesValidator interface implementation. Uses java language keyword set and java language rules for identifier.


Constructor Summary
JavaNamesValidator()
           
 
Method Summary
 boolean isIdentifier(java.lang.String name, Project project)
          Checks if the specified string is a valid identifier in the custom language.
 boolean isKeyword(java.lang.String name, Project project)
          Checks if the specified string is a keyword in the custom language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaNamesValidator

public JavaNamesValidator()
Method Detail

isKeyword

public boolean isKeyword(java.lang.String name,
                         Project project)
Description copied from interface: NamesValidator
Checks if the specified string is a keyword in the custom language.

Specified by:
isKeyword in interface NamesValidator
Parameters:
name - the string to check.
project - the project in the context of which the check is done.
Returns:
true if the string is a keyword, false otherwise.

isIdentifier

public boolean isIdentifier(java.lang.String name,
                            Project project)
Description copied from interface: NamesValidator
Checks if the specified string is a valid identifier in the custom language.

Specified by:
isIdentifier in interface NamesValidator
Parameters:
name - the string to check.
project - the project in the context of which the check is done.
Returns:
true if the string is a valid identifier, false otherwise.