class JType: j_base_type: str j_type: str def __init__(self, value): raise NotImplementedError() def instance_of(self, other: "JType") -> bool: if self.j_type == other.j_type: return True # TODO inheritance check return False