Class InferenceBlockingTypeParameterVisitor

java.lang.Object
org.openzen.zenscript.codemodel.type.InferenceBlockingTypeParameterVisitor
All Implemented Interfaces:
TypeVisitor<Boolean>

public class InferenceBlockingTypeParameterVisitor extends Object implements TypeVisitor<Boolean>
Visitor to determine if a type has inference blocking type parameters.

This works by adding the known types to a map, and quering the map to see if a type has been seen before.

Types are first added to the map with a value of false, to indicate that it is currently being visited.

This is done to resolve circular types (see MyEnum extends Enum).

After extra processing is done (such as ArrayTypeID checking its element's type to determine if it blocks), the actual result of if the type blocks is inserted into the map.