org.brijframework.resources.context.ResourceContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of github-brijframework-resources Show documentation
Show all versions of github-brijframework-resources Show documentation
This is the resources library of brijframework
The newest version!
package org.brijframework.resources.context;
import org.brijframework.context.impl.module.AbstractModuleContext;
import org.brijframework.resources.container.ResourceContainer;
import org.brijframework.util.factories.ReflectionFactory;
import org.brijframework.util.reflect.InstanceUtil;
public class ResourceContext extends AbstractModuleContext{
@SuppressWarnings("unchecked")
@Override
public void init() {
try {
ReflectionFactory.getFactory().getExternalClassList().forEach(cls->{
if(ResourceContainer.class.isAssignableFrom(cls) && InstanceUtil.isAssignable(cls)) {
register((Class extends ResourceContainer>) cls);
}
});
} catch (Exception e) {
e.printStackTrace();
}
try {
ReflectionFactory.getFactory().getInternalClassList().forEach(cls->{
if(ResourceContainer.class.isAssignableFrom(cls) && InstanceUtil.isAssignable(cls)) {
register((Class extends ResourceContainer>) cls);
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy