protected Templates getTemplatesFromAnnotation(Class<?> cls,
Annotation[] anns,
MediaType mt) {
Templates t = null;
XSLTTransform ann = getXsltTransformAnn(anns, mt);
if (ann != null) {
t = annotationTemplates.get(ann.value());
if (t == null) {
String path = ann.value();
final String cp = "classpath:";
if (!path.startsWith(cp)) {
path = cp + path;
}
t = createTemplates(path);
if (t == null) {
createTemplates(ClassLoaderUtils.getResourceAsStream(ann.value(), cls));
}
if (t != null) {
annotationTemplates.putIfAbsent(ann.value(), t);
}
}
}
return t;