com.xiongyingqi.common.utils.context.ContextSupport Maven / Gradle / Ivy
The newest version!
package com.xiongyingqi.common.utils.context;
/**
* @author xiongyingqi
* @since 17-5-11 下午8:41
*/
public abstract class ContextSupport {
@SuppressWarnings("unchecked")
public static void setContext(T t) {
if (t == null) {
return;
}
Context context = new Context((Class) t.getClass());
context.setContext(t);
}
@SuppressWarnings("unchecked")
public static T getContext(Class clazz) {
Context context = new Context(clazz);
return context.getContext();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy