|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.psi.PsiType
public abstract class PsiType
Representation of Java type (primitive type, array or class type).
| Field Summary | |
|---|---|
static PsiType |
BOOLEAN
|
static PsiType |
BYTE
|
static PsiType |
CHAR
|
static PsiType |
DOUBLE
|
static PsiType[] |
EMPTY_ARRAY
|
static PsiType |
FLOAT
|
static PsiType |
INT
|
static PsiType |
LONG
|
static PsiType |
NULL
|
static PsiType |
SHORT
|
static PsiType |
VOID
|
| Constructor Summary | |
|---|---|
PsiType()
|
|
| Method Summary | ||
|---|---|---|
abstract
|
accept(PsiTypeVisitor<A> visitor)
Passes the type to the specified visitor. |
|
PsiArrayType |
createArrayType()
Creates array type with this type as a component. |
|
abstract boolean |
equalsToText(java.lang.String text)
Checks if the specified string is equivalent to the canonical text of the type. |
|
int |
getArrayDimensions()
Returns the number of array dimensions for the type. |
|
abstract java.lang.String |
getCanonicalText()
|
|
PsiType |
getDeepComponentType()
Returns the innermost component type for an array type. |
|
abstract java.lang.String |
getInternalCanonicalText()
|
|
static PsiClassType |
getJavaLangClass(PsiManager manager,
GlobalSearchScope resolveScope)
Returns the class type for the java.lang.Class class. |
|
static PsiClassType |
getJavaLangError(PsiManager manager,
GlobalSearchScope resolveScope)
Returns the class type for the java.lang.Error class. |
|
static PsiClassType |
getJavaLangObject(PsiManager manager,
GlobalSearchScope resolveScope)
Returns the class type for the java.lang.Object class. |
|
static PsiClassType |
getJavaLangRuntimeException(PsiManager manager,
GlobalSearchScope resolveScope)
Returns the class type for the java.lang.RuntimeException class. |
|
static PsiClassType |
getJavaLangString(PsiManager manager,
GlobalSearchScope resolveScope)
Returns the class type for the java.lang.String class. |
|
static PsiClassType |
getJavaLangTrowable(PsiManager manager,
GlobalSearchScope resolveScope)
Returns the class type for the java.lang.Throwable class. |
|
abstract java.lang.String |
getPresentableText()
Returns text of this type that can be presented to user. |
|
abstract GlobalSearchScope |
getResolveScope()
Returns the scope in which the reference to the underlying class of a class type is searched. |
|
abstract PsiType[] |
getSuperTypes()
Returns the list of superclass types for a class type. |
|
boolean |
isAssignableFrom(PsiType type)
Checks whether values of type type can be assigned to rvalues of this type. |
|
boolean |
isConvertibleFrom(PsiType type)
Checks whether values of type type can be casted to this type. |
|
abstract boolean |
isValid()
Checks if the type is currently valid. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PsiType BYTE
public static final PsiType CHAR
public static final PsiType DOUBLE
public static final PsiType FLOAT
public static final PsiType INT
public static final PsiType LONG
public static final PsiType SHORT
public static final PsiType BOOLEAN
public static final PsiType VOID
public static final PsiType NULL
public static PsiType[] EMPTY_ARRAY
| Constructor Detail |
|---|
public PsiType()
| Method Detail |
|---|
public PsiArrayType createArrayType()
public abstract java.lang.String getPresentableText()
public abstract java.lang.String getCanonicalText()
public abstract java.lang.String getInternalCanonicalText()
public abstract boolean isValid()
PsiElement.isValid()public boolean isAssignableFrom(PsiType type)
type can be assigned to rvalues of this type.
public boolean isConvertibleFrom(PsiType type)
type can be casted to this type.
public abstract boolean equalsToText(java.lang.String text)
text - the text to compare with.
public static PsiClassType getJavaLangObject(PsiManager manager,
GlobalSearchScope resolveScope)
manager - the PSI manager used to create the class type.resolveScope - the scope in which the class is searched.
public static PsiClassType getJavaLangClass(PsiManager manager,
GlobalSearchScope resolveScope)
manager - the PSI manager used to create the class type.resolveScope - the scope in which the class is searched.
public static PsiClassType getJavaLangTrowable(PsiManager manager,
GlobalSearchScope resolveScope)
manager - the PSI manager used to create the class type.resolveScope - the scope in which the class is searched.
public static PsiClassType getJavaLangString(PsiManager manager,
GlobalSearchScope resolveScope)
manager - the PSI manager used to create the class type.resolveScope - the scope in which the class is searched.
public static PsiClassType getJavaLangError(PsiManager manager,
GlobalSearchScope resolveScope)
manager - the PSI manager used to create the class type.resolveScope - the scope in which the class is searched.
public static PsiClassType getJavaLangRuntimeException(PsiManager manager,
GlobalSearchScope resolveScope)
manager - the PSI manager used to create the class type.resolveScope - the scope in which the class is searched.
public abstract <A> A accept(PsiTypeVisitor<A> visitor)
visitor - the visitor to accept the type.
public final int getArrayDimensions()
@NotNull public final PsiType getDeepComponentType()
this if the type is not
an array type.@Nullable public abstract GlobalSearchScope getResolveScope()
public java.lang.String toString()
toString in class java.lang.Object@NotNull public abstract PsiType[] getSuperTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||