My problem is a ST::groupThatCreatedThisInstance reference, for CompiledSTs loaded by a STGroupDir, is frankly useless for logging and debugging, because to get the actual file URL, requires stupidly redundant and costly re-testing, with url.openStream(), for the actual .stg or .st file URL.
If STGroupDir delegated all file loading to STGroupFile instances, the CompiledSTs could still be stored in the STGroupDir ::templates map, but would have useful ST::groupThatCreatedThisInstance references, to support this an STTemplateFile class could be created, including optional header for use by RawGroupDir.
An alternative would be to add a file URL to all CompiledST objects, this could be possibly be null if groupThatCreatedThisInstance is an STGroupString instance.
My problem is a ST::groupThatCreatedThisInstance reference, for CompiledSTs loaded by a STGroupDir, is frankly useless for logging and debugging, because to get the actual file URL, requires stupidly redundant and costly re-testing, with url.openStream(), for the actual .stg or .st file URL.
If STGroupDir delegated all file loading to STGroupFile instances, the CompiledSTs could still be stored in the STGroupDir ::templates map, but would have useful ST::groupThatCreatedThisInstance references, to support this an STTemplateFile class could be created, including optional header for use by RawGroupDir.
An alternative would be to add a file URL to all CompiledST objects, this could be possibly be null if groupThatCreatedThisInstance is an STGroupString instance.