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 classprotected static enumprotected static classprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<BoundSet.InferenceVar, BoundSet.VarBounds<?>> protected @Nullable Function<ITypePrinter, String> protected final ATypeprotected final Map<AbstractInvoke, BoundSet> protected @Nullable BoundSetprotected 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(Ternary ternary, 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, String paramName) voidconstrainReturnAssignable(ReferenceType polyResultType) voidconstrainThrown(ReferenceType exType) protected voidprotected BoundSet.VarBounds<?> copyVarBounds(BoundSet.VarBounds<?> other) static booleanprotected intdepth()protected voidfail(Function<ITypePrinter, String> failure) protected 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) voidprotected booleanstatic booleanprotected static booleanprotected voidlambdaParamsCanReceiveFunctionalInterfaceMethodType(List<AType> params, List<Parameter> fParams) static ATypestatic ReferenceTypeprotected abstract BoundSetmakeNestedBoundSet(AbstractInvoke invoke, Iterable<TypeParameter> vars, AType retType) static 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) protected voidmrefParamAssignable(AType fInterfaceParamType, String fInterfaceParamName, AType mrefParamType, String mrefParamName) protected voidmrefRetAssignable(AType mrefRetType, AType fInterfaceRetType) 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 ATypeprotected String
-
Field Details
-
vars
-
infVarRetType
-
bounds
-
nestedVars
-
failure
-
parent
-
-
Constructor Details
-
BoundSet
-
BoundSet
-
-
Method Details
-
initTypeParamBounds
public void initTypeParamBounds() -
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) -
isAcceptableResolution
-
solvePhase
@Nullable protected @Nullable ReferenceType solvePhase(BoundSet.ResolutionPhase phase, BoundSet.VarBounds<?> bounds, BoundSet.InferenceVarMapper solved) -
addNestedVars
-
depth
protected int depth() -
boundsFor
-
boundsFor
-
substInfVars
-
isPoly
-
couldBePolyOrHaveRawArgsErasure
-
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) -
assignable
-
assignable
protected void assignable(Instruction expr, ReferenceType resultType, ReferenceType t, @Nullable @Nullable BoundSet polyBounds) -
makeNestedBoundSet
protected abstract BoundSet makeNestedBoundSet(AbstractInvoke invoke, Iterable<TypeParameter> vars, AType retType) -
assignable
-
assignable
-
lambdaParamsCanReceiveFunctionalInterfaceMethodType
-
retTypeAssignable
-
assignable
-
mrefRetAssignable
-
mrefParamAssignable
-
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
-
varNameSuffix
-