Package com.godshawk.lib.annotations.modularity

Examples of com.godshawk.lib.annotations.modularity.Plugin.type()


    public PluginMetadata generateMetadata(Class<? extends IPlugin> plugin) {
        if (!plugin.isAnnotationPresent(Plugin.class)) {
            throw new IllegalArgumentException(String.format("Plugin %s is not annotated!", plugin.getSimpleName()));
        }
        Plugin pl = plugin.getDeclaredAnnotation(Plugin.class);
        return new PluginMetadata(pl.name(), pl.id(), pl.author(), pl.type());
    }

    public void internalPluginLoad(Class<? extends IPlugin> pluginClass) {
        try {
            PluginMetadata metadata = generateMetadata(pluginClass);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.