Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Load extensions with ServiceLoader #32

@CrissNamon

Description

@CrissNamon

Extensions for CompaJScriptBase are loaded manually with static method:

CompaJScriptBase.addExtension(new MathExtension());

They should be loaded with ServiceLoader automatically inside GroovyTranslator and then added to CompaJScriptBase with CompaJScriptBase.extend(Extension).
ServiceLoader requires file descriptor with name tech.hiddenproject.compaj.lang.extension.Extension placed in resources folder inside lang module. This file should contain fully qualified class names of all Extension classes, each on new line:

tech.hiddenproject.compaj.extension.ComplexExtension
tech.hiddenproject.compaj.extension.MathExtension
etc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions