public class PsiWildcardType extends PsiType.Stub implements JvmWildcardType
PsiType.Stub
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTENDS_PREFIX |
static java.lang.String |
SUPER_PREFIX |
Modifier and Type | Method and Description |
---|---|
<A> A |
accept(PsiTypeVisitor<A> visitor)
Passes the type to the specified visitor.
|
static PsiWildcardType |
createExtends(PsiManager manager,
PsiType bound) |
static PsiWildcardType |
createSuper(PsiManager manager,
PsiType bound) |
static PsiWildcardType |
createUnbounded(PsiManager manager) |
boolean |
equals(java.lang.Object o) |
boolean |
equalsToText(java.lang.String text)
Checks if the specified string is equivalent to the canonical text of the type.
|
PsiType |
getBound()
Use this method to obtain a bound of wildcard type.
|
java.lang.String |
getCanonicalText(boolean annotated)
Returns canonical representation of the type (all references fully-qualified).
|
PsiType |
getExtendsBound()
A lower bound that this wildcard imposes on type parameter value.
That is: for ? extends XXX : XXX
for ? super XXX : java.lang.Object
for ? : java.lang.Object
|
java.lang.String |
getInternalCanonicalText()
Return canonical text of the type with some internal details added for presentational purposes.
|
PsiManager |
getManager() |
java.lang.String |
getPresentableText(boolean annotated)
Returns text of the type that can be presented to a user (references normally non-qualified).
|
GlobalSearchScope |
getResolveScope()
Returns the scope in which the reference to the underlying class of a class type is searched.
|
PsiType |
getSuperBound()
An upper bound that this wildcard imposes on type parameter value.
That is: for ? extends XXX : null type
for ? super XXX : XXX
for ? : null type
|
PsiType [] |
getSuperTypes()
Returns the list of superclass types for a class type.
|
int |
hashCode() |
boolean |
isBounded() |
boolean |
isExtends()
Returns whether this is a lower bound (
? extends XXX ). |
boolean |
isSuper()
Returns whether this is an upper bound (
? super XXX ). |
boolean |
isValid()
Checks if the type is currently valid.
|
JvmType |
lowerBound()
A lower bound that this wildcard imposes on type parameter value.
That is: for ? extends XXX : empty iterable
for ? super XXX : XXX
for ? : null type
|
JvmType |
upperBound()
An upper bound that this wildcard imposes on type parameter value.
That is: for ? extends XXX : XXX
for ? super XXX : java.lang.Object
for ? : java.lang.Object
|
getCanonicalText, getPresentableText
addAnnotation, annotate, createArray, createArrayType, createArrayType, findAnnotation, getAnnotationProvider, getAnnotations, getApplicableAnnotations, getArrayDimensions, getDeepComponentType, getJavaLangClass, getJavaLangError, getJavaLangObject, getJavaLangRuntimeException, getJavaLangString, getJavaLangThrowable, getTypeByName, isAssignableFrom, isConvertibleFrom, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept
getAnnotations
hasAnnotation
public static final java.lang.String EXTENDS_PREFIX
public static final java.lang.String SUPER_PREFIX
public static PsiWildcardType createUnbounded(PsiManager manager)
public static PsiWildcardType createExtends(PsiManager manager, PsiType bound)
public static PsiWildcardType createSuper(PsiManager manager, PsiType bound)
public java.lang.String getPresentableText(boolean annotated)
PsiType
getPresentableText
in class PsiType.Stub
public java.lang.String getCanonicalText(boolean annotated)
PsiType
getCanonicalText
in class PsiType.Stub
public java.lang.String getInternalCanonicalText()
PsiType
getInternalCanonicalText
in class PsiType
public GlobalSearchScope getResolveScope()
PsiType
getResolveScope
in class PsiType
public PsiType [] getSuperTypes()
PsiType
getSuperTypes
in class PsiType
public boolean equalsToText(java.lang.String text)
PsiType
equalsToText
in class PsiType
text
- the text to compare with.public PsiManager getManager()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public PsiType getBound()
null
if unbounded, a bound otherwise.public <A> A accept(PsiTypeVisitor<A> visitor)
PsiType
public boolean isValid()
PsiType
isValid
in class PsiType
PsiElement.isValid()
public boolean isExtends()
? extends XXX
).true
for extends
wildcards, false
for super
and unbounded wildcards.public boolean isSuper()
? super XXX
).true
for super
wildcards, false
for extends
and unbounded wildcards.public boolean isBounded()
public PsiType getExtendsBound()
? extends XXX
: XXX
? super XXX
: java.lang.Object
?
: java.lang.Object
PsiType
representing a lower bound. Never returns null
.public PsiType getSuperBound()
? extends XXX
: null type
? super XXX
: XXX
?
: null type
PsiType
representing an upper bound. Never returns null
.public JvmType upperBound()
JvmWildcardType
? extends XXX
: XXX
? super XXX
: java.lang.Object
?
: java.lang.Object
upperBound
in interface JvmWildcardType
WildcardType.getUpperBounds()
public JvmType lowerBound()
JvmWildcardType
? extends XXX
: empty iterable
? super XXX
: XXX
?
: null type
lowerBound
in interface JvmWildcardType
WildcardType.getLowerBounds()