public abstract class PsiClassType extends PsiType implements JvmReferenceType
Modifier and Type | Class and Description |
---|---|
static interface |
PsiClassType.ClassResolveResult
Represents the result of resolving a reference to a Java class.
|
static class |
PsiClassType.Stub |
Modifier and Type | Field and Description |
---|---|
static ArrayFactory<PsiClassType> |
ARRAY_FACTORY |
static PsiClassType[] |
EMPTY_ARRAY |
protected LanguageLevel |
myLanguageLevel |
Modifier | Constructor and Description |
---|---|
protected |
PsiClassType(LanguageLevel languageLevel) |
protected |
PsiClassType(LanguageLevel languageLevel,
PsiAnnotation [] annotations) |
|
PsiClassType(LanguageLevel languageLevel,
TypeAnnotationProvider provider) |
Modifier and Type | Method and Description |
---|---|
<A> A |
accept(PsiTypeVisitor<A> visitor)
Passes the type to the specified visitor.
|
PsiClassType |
annotate(TypeAnnotationProvider provider) |
boolean |
equals(java.lang.Object obj) |
abstract java.lang.String |
getClassName()
Returns the non-qualified name of the class referenced by the type.
|
abstract LanguageLevel |
getLanguageLevel() |
java.lang.String |
getName() |
int |
getParameterCount() |
abstract PsiType [] |
getParameters()
Returns the list of type arguments for the type.
|
abstract GlobalSearchScope |
getResolveScope()
Overrides
PsiType.getResolveScope() to narrow specify @NotNull. |
PsiType [] |
getSuperTypes()
Returns the list of superclass types for a class type.
|
int |
hashCode() |
boolean |
hasNonTrivialParameters()
Checks if the class type has any parameters which are not unbounded wildcards (and not extends-wildcard with the same bound as corresponding type parameter bound)
and do not have substituted arguments.
|
boolean |
hasParameters()
Checks if the class type has any parameters with no substituted arguments.
|
boolean |
isRaw()
Checks whether this type is a raw type.
|
static boolean |
isRaw(PsiClassType.ClassResolveResult resolveResult)
Checks whether the specified resolve result represents a raw type.
|
abstract PsiClassType |
rawType()
Returns the raw type (with no values assigned to type parameters) corresponding to this type.
|
abstract PsiClass |
resolve()
Resolves the class reference and returns the resulting class.
|
abstract 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.
|
JvmTypeResolveResult |
resolveType() |
abstract PsiClassType |
setLanguageLevel(LanguageLevel languageLevel)
Functional style setter preserving original type's language level
|
java.lang.Iterable<JvmType> |
typeArguments() |
addAnnotation, createArray, createArrayType, createArrayType, equalsToText, findAnnotation, getAnnotationProvider, getAnnotations, getApplicableAnnotations, getArrayDimensions, getCanonicalText, getCanonicalText, getDeepComponentType, getInternalCanonicalText, getJavaLangClass, getJavaLangError, getJavaLangObject, getJavaLangRuntimeException, getJavaLangString, getJavaLangThrowable, getPresentableText, getPresentableText, getTypeByName, isAssignableFrom, isConvertibleFrom, isValid, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept
getAnnotations
hasAnnotation
public static final PsiClassType[] EMPTY_ARRAY
public static final ArrayFactory<PsiClassType> ARRAY_FACTORY
protected final LanguageLevel myLanguageLevel
protected PsiClassType(LanguageLevel languageLevel)
protected PsiClassType(LanguageLevel languageLevel, PsiAnnotation [] annotations)
public PsiClassType(LanguageLevel languageLevel, TypeAnnotationProvider provider)
public PsiClassType annotate(TypeAnnotationProvider provider)
public abstract PsiClass resolve()
resolve
in interface JvmReferenceType
public abstract java.lang.String getClassName()
public abstract PsiType [] getParameters()
public int getParameterCount()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean hasParameters()
public boolean hasNonTrivialParameters()
public int hashCode()
hashCode
in class java.lang.Object
public PsiType [] getSuperTypes()
PsiType
getSuperTypes
in class PsiType
public static boolean isRaw(PsiClassType.ClassResolveResult resolveResult)
public boolean isRaw()
public abstract PsiClassType.ClassResolveResult resolveGenerics()
public abstract PsiClassType rawType()
public abstract GlobalSearchScope getResolveScope()
PsiType.getResolveScope()
to narrow specify @NotNull.getResolveScope
in class PsiType
public <A> A accept(PsiTypeVisitor<A> visitor)
PsiType
public abstract LanguageLevel getLanguageLevel()
public abstract PsiClassType setLanguageLevel(LanguageLevel languageLevel)
languageLevel
- level to obtain class type withpublic java.lang.String getName()
getName
in interface JvmReferenceType
public JvmTypeResolveResult resolveType()
resolveType
in interface JvmReferenceType
null
if it cannot be resolvedpublic java.lang.Iterable<JvmType> typeArguments()
typeArguments
in interface JvmReferenceType
ParameterizedType.getActualTypeArguments()