All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ssssssss.script.functions.DynamicModuleImport Maven / Gradle / Ivy

The newest version!
package org.ssssssss.script.functions;

import org.ssssssss.script.MagicScriptContext;

import java.util.function.Function;

public class DynamicModuleImport {

	private final Class targetClass;

	private final Function finder;

	public DynamicModuleImport(Class targetClass, Function finder) {
		this.targetClass = targetClass;
		this.finder = finder;
	}

	public Object getDynamicModule(MagicScriptContext context){
		return finder.apply(context);
	}

	public Class getTargetClass() {
		return targetClass;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy