public class PsiClassReferenceType extends PsiClassType.Stub
PsiClassType.ClassResolveResult, PsiClassType.Stub
ARRAY_FACTORY, EMPTY_ARRAY, myLanguageLevel
Constructor and Description |
---|
PsiClassReferenceType(PsiJavaCodeReferenceElement reference,
LanguageLevel level) |
PsiClassReferenceType(PsiJavaCodeReferenceElement reference,
LanguageLevel level,
PsiAnnotation [] annotations) |
PsiClassReferenceType(PsiJavaCodeReferenceElement reference,
LanguageLevel level,
TypeAnnotationProvider provider) |
Modifier and Type | Method and Description |
---|---|
boolean |
equalsToText(java.lang.String text)
Checks if the specified string is equivalent to the canonical text of the type.
|
PsiAnnotation [] |
getAnnotations()
Returns the list of annotations syntactically contained in the element.
|
java.lang.String |
getCanonicalText(boolean annotated)
Returns canonical representation of the type (all references fully-qualified).
|
java.lang.String |
getClassName()
Returns the non-qualified name of the class referenced by the type.
|
java.lang.String |
getInternalCanonicalText()
Return canonical text of the type with some internal details added for presentational purposes.
|
LanguageLevel |
getLanguageLevel() |
PsiType [] |
getParameters()
Returns the list of type arguments for the type.
|
java.lang.String |
getPresentableText(boolean annotated)
Returns text of the type that can be presented to a user (references normally non-qualified).
|
PsiJavaCodeReferenceElement |
getReference() |
GlobalSearchScope |
getResolveScope()
Overrides
PsiType.getResolveScope() to narrow specify @NotNull. |
boolean |
isValid()
Checks if the type is currently valid.
|
PsiClassType |
rawType()
Returns the raw type (with no values assigned to type parameters) corresponding to this type.
|
PsiClass |
resolve()
Resolves the class reference and returns the resulting class.
|
PsiClassType.ClassResolveResult |
resolveGenerics()
Returns the resolve result containing the class referenced by the class type and the
substitutor which can substitute the values of type arguments used in the class type
declaration.
|
PsiClassType |
setLanguageLevel(LanguageLevel languageLevel)
Functional style setter preserving original type's language level
|
getCanonicalText, getPresentableText
accept, annotate, equals, getName, getParameterCount, getSuperTypes, hashCode, hasNonTrivialParameters, hasParameters, isRaw, isRaw, resolveType, typeArguments
addAnnotation, createArray, createArrayType, createArrayType, findAnnotation, getAnnotationProvider, getApplicableAnnotations, getArrayDimensions, getDeepComponentType, getJavaLangClass, getJavaLangError, getJavaLangObject, getJavaLangRuntimeException, getJavaLangString, getJavaLangThrowable, getTypeByName, isAssignableFrom, isConvertibleFrom, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept
hasAnnotation
public PsiClassReferenceType(PsiJavaCodeReferenceElement reference, LanguageLevel level)
public PsiClassReferenceType(PsiJavaCodeReferenceElement reference, LanguageLevel level, PsiAnnotation [] annotations)
public PsiClassReferenceType(PsiJavaCodeReferenceElement reference, LanguageLevel level, TypeAnnotationProvider provider)
public boolean isValid()
PsiType
isValid
in class PsiType
PsiElement.isValid()
public boolean equalsToText(java.lang.String text)
PsiType
equalsToText
in class PsiType
text
- the text to compare with.public GlobalSearchScope getResolveScope()
PsiClassType
PsiType.getResolveScope()
to narrow specify @NotNull.getResolveScope
in class PsiClassType
public PsiAnnotation [] getAnnotations()
PsiAnnotationOwner
getAnnotations
in interface JvmType
getAnnotations
in interface PsiAnnotationOwner
getAnnotations
in class PsiType
PsiType.getAnnotationProvider()
to retrieve the annotations.AnnotatedElement.getAnnotations()
public LanguageLevel getLanguageLevel()
getLanguageLevel
in class PsiClassType
public PsiClassType setLanguageLevel(LanguageLevel languageLevel)
PsiClassType
setLanguageLevel
in class PsiClassType
languageLevel
- level to obtain class type withpublic PsiClass resolve()
PsiClassType
resolve
in interface JvmReferenceType
resolve
in class PsiClassType
public PsiClassType.ClassResolveResult resolveGenerics()
PsiClassType
resolveGenerics
in class PsiClassType
public PsiClassType rawType()
PsiClassType
rawType
in class PsiClassType
public java.lang.String getClassName()
PsiClassType
getClassName
in class PsiClassType
public PsiType [] getParameters()
PsiClassType
getParameters
in class PsiClassType
public java.lang.String getPresentableText(boolean annotated)
PsiType
getPresentableText
in class PsiClassType.Stub
public java.lang.String getCanonicalText(boolean annotated)
PsiType
getCanonicalText
in class PsiClassType.Stub
public java.lang.String getInternalCanonicalText()
PsiType
getInternalCanonicalText
in class PsiType
public PsiJavaCodeReferenceElement getReference()