|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.psi.PsiNameHelper
public abstract class PsiNameHelper
Service for validating and parsing Java identifiers.
PsiManager.getNameHelper()| Constructor Summary | |
|---|---|
PsiNameHelper()
|
|
| Method Summary | |
|---|---|
static java.lang.String[] |
getClassParametersText(java.lang.String referenceText)
Obtains text of all type parameter values in a reference. |
static java.lang.String |
getPresentableText(PsiJavaCodeReferenceElement ref)
|
static java.lang.String |
getQualifiedClassName(java.lang.String referenceText,
boolean removeWhitespace)
|
static java.lang.String |
getShortClassName(java.lang.String referenceText)
|
abstract 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. |
abstract 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. |
abstract 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. |
abstract boolean |
isQualifiedName(java.lang.String text)
Checks if the specified string is a qualified name (sequence of identifiers separated by periods). |
static java.lang.String[] |
splitNameIntoWords(java.lang.String name)
Splits an identifier into words, separated with underscores or upper-case characters (camel-case). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PsiNameHelper()
| Method Detail |
|---|
public abstract boolean isIdentifier(java.lang.String text)
text - the text to check.
public abstract boolean isIdentifier(java.lang.String text,
LanguageLevel languageLevel)
text - the text to check.
public abstract boolean isKeyword(java.lang.String text)
text - the text to check.
public abstract boolean isQualifiedName(java.lang.String text)
text - the text to check.
public static java.lang.String getShortClassName(java.lang.String referenceText)
public static java.lang.String getPresentableText(PsiJavaCodeReferenceElement ref)
public static java.lang.String getQualifiedClassName(java.lang.String referenceText,
boolean removeWhitespace)
public static java.lang.String[] getClassParametersText(java.lang.String referenceText)
A<List<String>>.B<Integer> yields
["List<String>","Integer"]
referenceText - the text of the reference to calculate type parameters for.
public static java.lang.String[] splitNameIntoWords(java.lang.String name)
name - the identifier to split.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||