Package net.hasor.core

Examples of net.hasor.core.Environment.findClass()


*/
@Plugin
public class ListenerPlugin implements Module  {
    public void loadModule(ApiBinder apiBinder) throws Throwable {
        final Environment env = apiBinder.getEnvironment();
        final Set<Class<?>> eventSet = env.findClass(Listener.class);
        if (eventSet == null || eventSet.isEmpty())
            return;
        for (final Class<?> eventClass : eventSet) {
            /*排除没有实现 EventListener 接口的类。*/
            if (EventListener.class.isAssignableFrom(eventClass) == false) {
View Full Code Here


        });
    }
    /**装载注解形式的SettingsListener*/
    private void loadAnnoSettings(ApiBinder apiBinder) {
        final Environment env = apiBinder.getEnvironment();
        Set<Class<?>> settingSet = env.findClass(Settings.class);
        if (settingSet == null || settingSet.isEmpty())
            return;
        for (Class<?> settingClass : settingSet) {
            if (SettingsListener.class.isAssignableFrom(settingClass) == false) {
                Hasor.logWarn("not implemented SettingsListener :%s", settingClass);
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.