Class ResolvedWildcard
java.lang.Object
com.github.javaparser.resolution.types.ResolvedWildcard
- All Implemented Interfaces:
ResolvedType
A wildcard can be:
- unbounded (?)
- have a lower bound (? super Number)
- have an upper bound (? extends Number)
It is not possible to have both a lower and an upper bound at the same time.
- Author:
- Federico Tomassetti
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondescribe()
boolean
static ResolvedWildcard
extendsBound(ResolvedType type)
int
hashCode()
boolean
isAssignableBy(ResolvedType other)
This method checks if ThisType t = new OtherType() would compile.boolean
boolean
boolean
boolean
isSuper()
boolean
boolean
boolean
mention(List<ResolvedTypeParameterDeclaration> typeParameters)
Does this type mention at all, directly or indirectly, the given type parameters?replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType replaced, Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes)
Replace all variables referring to the given TypeParameter with the given value.static ResolvedWildcard
superBound(ResolvedType type)
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.github.javaparser.resolution.types.ResolvedType
arrayLevel, asArrayType, asConstraintType, asPrimitive, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, erasure, isArray, isConstraint, isInferenceVariable, isNull, isNumericType, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, replaceTypeVariables
-
Field Details
-
UNBOUNDED
-
-
Method Details
-
superBound
-
extendsBound
-
toString
-
isWildcard
public boolean isWildcard()- Specified by:
isWildcard
in interfaceResolvedType
-
asWildcard
- Specified by:
asWildcard
in interfaceResolvedType
-
equals
-
hashCode
public int hashCode() -
describe
- Specified by:
describe
in interfaceResolvedType
-
isSuper
public boolean isSuper() -
isExtends
public boolean isExtends() -
isBounded
public boolean isBounded() -
getBoundedType
-
isAssignableBy
Description copied from interface:ResolvedType
This method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableBy
in interfaceResolvedType
-
replaceTypeVariables
public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType replaced, Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes)Description copied from interface:ResolvedType
Replace all variables referring to the given TypeParameter with the given value. By replacing these values I could also infer some type equivalence. Those would be collected in the given map.- Specified by:
replaceTypeVariables
in interfaceResolvedType
-
mention
Description copied from interface:ResolvedType
Does this type mention at all, directly or indirectly, the given type parameters?- Specified by:
mention
in interfaceResolvedType
-
isUpperBounded
public boolean isUpperBounded() -
isLowerBounded
public boolean isLowerBounded()
-