public class PsiNameHelperImpl extends PsiNameHelper
Constructor and Description |
---|
PsiNameHelperImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
static PsiNameHelper |
getInstance() |
protected LanguageLevel |
getLanguageLevel() |
boolean |
isIdentifier(java.lang.String text)
Checks if the specified text is a Java identifier, using the language level of the project
with which the name helper is associated to filter out keywords.
|
boolean |
isIdentifier(java.lang.String text,
LanguageLevel languageLevel)
Checks if the specified text is a Java identifier, using the specified language level
with which the name helper is associated to filter out keywords.
|
boolean |
isKeyword(java.lang.String text)
Checks if the specified text is a Java keyword, using the language level of the project
with which the name helper is associated.
|
boolean |
isQualifiedName(java.lang.String text)
Checks if the specified string is a qualified name (sequence of identifiers separated by
periods).
|
appendAnnotations, appendAnnotations, appendTypeArgs, getClassParametersText, getInstance, getPresentableText, getPresentableText, getQualifiedClassName, getShortClassName, isSubpackageOf, isValidModuleName
public PsiNameHelperImpl(Project project)
public boolean isIdentifier(java.lang.String text)
PsiNameHelper
isIdentifier
in class PsiNameHelper
text
- the text to check.protected LanguageLevel getLanguageLevel()
public boolean isIdentifier(java.lang.String text, LanguageLevel languageLevel)
PsiNameHelper
isIdentifier
in class PsiNameHelper
text
- the text to check.languageLevel
- to check text against. For instance 'assert' or 'enum' might or might not be identifiers depending on language levelpublic boolean isKeyword(java.lang.String text)
PsiNameHelper
isKeyword
in class PsiNameHelper
text
- the text to check.public boolean isQualifiedName(java.lang.String text)
PsiNameHelper
isQualifiedName
in class PsiNameHelper
text
- the text to check.public static PsiNameHelper getInstance()