def __init__(self, object_type: Type[T], obj_on_filesystem: PersistedObject,<EOL>parser: _BaseParserDeclarationForRegistries, accept_union_types: bool = False):
<EOL>t = get_alternate_types_resolving_forwardref_union_and_typevar(object_type)<EOL>if len(t) == <NUM_LIT:1>:<EOL><INDENT>check_var(t[<NUM_LIT:0>], var_types=type, var_name='<STR_LIT>')<EOL>self.obj_type = t[<NUM_LIT:0>]<EOL><DEDENT>elif not accept_union_types:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(object_type))<EOL><DEDENT>else:<EOL><INDENT>self.obj_type = object_type<EOL><DEDENT>check_var(obj_on_filesystem, var_types=PersistedObject, var_name='<STR_LIT>')<EOL>self.obj_on_fs_to_parse = obj_on_filesystem<EOL>check_var(parser, var_types=_BaseParserDeclarationForRegistries, var_name='<STR_LIT>')<EOL>self.parser = parser<EOL>
Creates a parsing plan, from an object's type, an object's files, and a parser.

:param object_type:
:param obj_on_filesystem:
:param parser:
:param accept_union_types: a boolean to accept when object_type is a Union or a TypeVar with union constraints