use of org.nutz.lang.util.ClassMeta in project nutz by nutzam.
the class Loadings method createInfo.
public static ActionInfo createInfo(Class<?> type) {
ActionInfo ai = new ActionInfo();
evalEncoding(ai, Mirror.getAnnotationDeep(type, Encoding.class));
evalHttpAdaptor(ai, Mirror.getAnnotationDeep(type, AdaptBy.class));
evalActionFilters(ai, Mirror.getAnnotationDeep(type, Filters.class));
evalPathMap(ai, Mirror.getAnnotationDeep(type, PathMap.class));
evalOk(ai, Mirror.getAnnotationDeep(type, Ok.class));
evalFail(ai, Mirror.getAnnotationDeep(type, Fail.class));
evalAt(ai, Mirror.getAnnotationDeep(type, At.class), type.getSimpleName());
evalActionChainMaker(ai, Mirror.getAnnotationDeep(type, Chain.class));
evalModule(ai, type);
if (Mvcs.DISPLAY_METHOD_LINENUMBER) {
InputStream ins = type.getClassLoader().getResourceAsStream(type.getName().replace(".", "/") + ".class");
if (ins != null) {
try {
ClassMeta meta = ClassMetaReader.build(ins);
ai.setMeta(meta);
} catch (Exception e) {
}
}
}
return ai;
}
Aggregations