Class BoundSet
java.lang.Object
net.covers1624.coffeegrinder.bytecode.transform.transformers.generics.BoundSet
- Direct Known Subclasses:
TypeHintBoundSet
Created by covers1624 on 20/6/22.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected static interfaceprotected static enumprotected static classprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<BoundSet.InferenceVar, BoundSet.VarBounds<?>> protected @Nullable Stringprotected booleanprotected final ATypeprotected final Map<AbstractInvoke, BoundSet> protected final Map<TypeParameter, BoundSet.InferenceVar> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddNestedVars(AbstractInvoke expr, BoundSet other) protected voidassignable(MethodDecl lambda, ReferenceType t) protected voidassignable(MethodReference mref, ReferenceType t) protected voidassignable(Instruction expr, ReferenceType t) protected voidassignable(Instruction expr, ReferenceType resultType, ReferenceType t, @Nullable BoundSet polyBounds) protected voidprotected voidprotected BoundSet.VarBounds<?> protected BoundSet.VarBounds<?> boundsFor(TypeParameter param) voidconstrainAssignable(Instruction insn, AType type) voidconstrainReturnAssignable(ReferenceType polyResultType) voidconstrainThrown(ReferenceType exType) protected voidprotected BoundSet.VarBounds<?> copyVarBounds(BoundSet.VarBounds<?> other) protected voidprotected voidprotected voidstatic ATypegetHierarchyCompatibleType(AType targetType, AType inputType) static ClassTypegetHierarchyCompatibleType(ClassType targetType, ReferenceType compatibleType) static ReferenceTypegetHierarchyCompatibleType(ReferenceType targetType, ReferenceType compatibleType) static Iterable<TypeParameter> getInferrableTypeParams(Method method) static booleanprotected static booleanprotected voidlambdaParamsCanReceiveFunctionalInterfaceMethodType(List<AType> params, List<Parameter> fParams) static ATypestatic ReferenceTypeprotected abstract BoundSetmakeNestedBoundSet(Iterable<TypeParameter> vars, AType retType) static ReferenceTypestatic booleanstatic booleanmentionsTypeParam(AType t, ITypeParameterizedMember owner) static booleanmentionsTypeParam(ReferenceType t, ITypeParameterizedMember owner, Predicate<TypeParameter> seen) static booleanmentionsTypeParamFromClassOrOuter(AType t, ClassType clazz) static <B extends BoundSet>
BmonomorphicBounds(AbstractInvoke invoke, BiFunction<Iterable<TypeParameter>, AType, B> factory) static <B extends BoundSet>
BnewBoundSet(AbstractInvoke invoke, BiFunction<Iterable<TypeParameter>, AType, B> factory) protected BoundSet.VarBounds<?> protected voidretTypeAssignable(MethodDecl lambda, ReferenceType retType) protected BoundSet.InferenceVarMappersolve()protected @Nullable ReferenceTypesolvePhase(BoundSet.ResolutionPhase phase, BoundSet.VarBounds<?> bounds, BoundSet.InferenceVarMapper solved) protected final Map<BoundSet.InferenceVar, ReferenceType> solvePhases(List<BoundSet.InferenceVar> vars, BoundSet.InferenceVarMapper solved) protected Map<BoundSet.InferenceVar, ReferenceType> solveVars(List<BoundSet.InferenceVar> vars, BoundSet.InferenceVarMapper solved) protected voidstatic AType
-
Field Details
-
vars
-
infVarRetType
-
bounds
-
nestedVars
-
hasRawArgs
protected boolean hasRawArgs -
failure
-
-
Constructor Details
-
BoundSet
-
BoundSet
-
-
Method Details
-
newVarBounds
-
copyVarBounds
-
constrainThrown
-
constrainAssignable
-
constrainReturnAssignable
-
solve
-
solveVars
protected Map<BoundSet.InferenceVar,ReferenceType> solveVars(List<BoundSet.InferenceVar> vars, BoundSet.InferenceVarMapper solved) -
solvePhases
protected final Map<BoundSet.InferenceVar,ReferenceType> solvePhases(List<BoundSet.InferenceVar> vars, BoundSet.InferenceVarMapper solved) -
solvePhase
@Nullable protected @Nullable ReferenceType solvePhase(BoundSet.ResolutionPhase phase, BoundSet.VarBounds<?> bounds, BoundSet.InferenceVarMapper solved) -
addNestedVars
-
boundsFor
-
boundsFor
-
isPoly
-
isProper
-
getInferrableTypeParams
-
mentionsTypeParamFromClassOrOuter
-
mentionsInferrableTypeParam
-
mentionsTypeParam
-
mentionsTypeParam
public static boolean mentionsTypeParam(ReferenceType t, ITypeParameterizedMember owner, Predicate<TypeParameter> seen) -
getHierarchyCompatibleType
-
getHierarchyCompatibleType
public static ReferenceType getHierarchyCompatibleType(ReferenceType targetType, ReferenceType compatibleType) -
getHierarchyCompatibleType
public static ClassType getHierarchyCompatibleType(ClassType targetType, ReferenceType compatibleType) -
makeRepresentable
-
assignable
-
assignable
protected void assignable(Instruction expr, ReferenceType resultType, ReferenceType t, @Nullable @Nullable BoundSet polyBounds) -
makeNestedBoundSet
-
assignable
-
lambdaParamsCanReceiveFunctionalInterfaceMethodType
-
retTypeAssignable
-
assignable
-
assignableStripWildcards
-
upper
-
lower
-
lower
-
assignable
-
monomorphicBounds
public static <B extends BoundSet> B monomorphicBounds(AbstractInvoke invoke, BiFunction<Iterable<TypeParameter>, AType, B> factory) -
newBoundSet
public static <B extends BoundSet> B newBoundSet(AbstractInvoke invoke, BiFunction<Iterable<TypeParameter>, AType, B> factory) -
subtype
-
failProperSubtype
-
containedBy
-
failProperTypesNotEqual
-
fail
-