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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondescribe()booleanstatic ResolvedWildcardextendsBound(ResolvedType type)inthashCode()booleanisAssignableBy(ResolvedType other)This method checks if ThisType t = new OtherType() would compile.booleanbooleanbooleanbooleanisSuper()booleanbooleanbooleanmention(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 ResolvedWildcardsuperBound(ResolvedType type)toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
isWildcardin interfaceResolvedType
-
asWildcard
- Specified by:
asWildcardin interfaceResolvedType
-
equals
-
hashCode
public int hashCode() -
describe
- Specified by:
describein interfaceResolvedType
-
isSuper
public boolean isSuper() -
isExtends
public boolean isExtends() -
isBounded
public boolean isBounded() -
getBoundedType
-
isAssignableBy
Description copied from interface:ResolvedTypeThis method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableByin interfaceResolvedType
-
replaceTypeVariables
public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType replaced, Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes)Description copied from interface:ResolvedTypeReplace 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:
replaceTypeVariablesin interfaceResolvedType
-
mention
Description copied from interface:ResolvedTypeDoes this type mention at all, directly or indirectly, the given type parameters?- Specified by:
mentionin interfaceResolvedType
-
isUpperBounded
public boolean isUpperBounded() -
isLowerBounded
public boolean isLowerBounded()
-