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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ResolvedTypeprivate ResolvedWildcard.BoundTypestatic ResolvedWildcard -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateResolvedWildcard(ResolvedWildcard.BoundType type, ResolvedType boundedType) -
Method Summary
Modifier and TypeMethodDescriptiondescribe()booleanerasure()static 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.solveGenericTypes(Context context) static ResolvedWildcardsuperBound(ResolvedType type) toString()Methods inherited from interface ResolvedType
arrayLevel, asArrayType, asConstraintType, asPrimitive, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, isArray, isConstraint, isInferenceVariable, isNull, isNumericType, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, replaceTypeVariables, toDescriptor
-
Field Details
-
UNBOUNDED
-
type
-
boundedType
-
-
Constructor Details
-
ResolvedWildcard
-
-
Method Details
-
superBound
-
extendsBound
-
toString
-
isWildcard
public boolean isWildcard()- Specified by:
isWildcardin interfaceResolvedType
-
asWildcard
- Specified by:
asWildcardin interfaceResolvedType
-
equals
-
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() -
solveGenericTypes
- Specified by:
solveGenericTypesin interfaceResolvedType
-
erasure
- Specified by:
erasurein interfaceResolvedType
-