Class GenericTypeBinder
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.types.GenericTypeBinder
-
public class GenericTypeBinder extends java.lang.Object
FIXME - this class has multiple ways of implementing the same thing - definitely feels redundant!
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,JavaTypeInstance>
nameToBoundType
-
Constructor Summary
Constructors Modifier Constructor Description private
GenericTypeBinder(java.util.Map<java.lang.String,JavaTypeInstance> nameToBoundType)
-
Method Summary
-
-
-
Field Detail
-
nameToBoundType
private final java.util.Map<java.lang.String,JavaTypeInstance> nameToBoundType
-
-
Constructor Detail
-
GenericTypeBinder
private GenericTypeBinder(java.util.Map<java.lang.String,JavaTypeInstance> nameToBoundType)
-
-
Method Detail
-
createEmpty
public static GenericTypeBinder createEmpty()
-
create
public static GenericTypeBinder create(java.util.List<FormalTypeParameter>... ftps)
-
bind
static GenericTypeBinder bind(java.util.List<FormalTypeParameter> methodFormalTypeParameters, ClassSignature classSignature, java.util.List<JavaTypeInstance> args, JavaGenericRefTypeInstance boundInstance, java.util.List<JavaTypeInstance> boundArgs)
-
buildIdentityBindings
public static GenericTypeBinder buildIdentityBindings(JavaGenericRefTypeInstance unbound)
-
extractBaseBindings
public static GenericTypeBinder extractBaseBindings(JavaGenericBaseInstance unbound, JavaTypeInstance maybeBound)
-
extractBindings
public static GenericTypeBinder extractBindings(JavaGenericBaseInstance unbound, JavaTypeInstance maybeBound)
-
doBind
private static void doBind(java.util.Map<java.lang.String,JavaTypeInstance> boundNames, JavaGenericBaseInstance unbound, JavaTypeInstance maybeBound)
-
removeBinding
public void removeBinding(JavaGenericPlaceholderTypeInstance type)
-
getBindingFor
JavaTypeInstance getBindingFor(FormalTypeParameter formalTypeParameter)
-
getBindingFor
public JavaTypeInstance getBindingFor(JavaTypeInstance maybeUnbound)
-
isBetterBinding
private static boolean isBetterBinding(JavaTypeInstance isBetter, JavaTypeInstance than)
-
suggestOnlyNullBinding
public void suggestOnlyNullBinding(JavaGenericPlaceholderTypeInstance type)
-
suggestBindingFor
public void suggestBindingFor(java.lang.String name, JavaTypeInstance binding)
-
mergeWith
public GenericTypeBinder mergeWith(GenericTypeBinder other, boolean mergeToCommonClass)
-
createAssignmentRhsBindings
public GenericTypeBinder createAssignmentRhsBindings(GenericTypeBinder rhsBinder)
-
-