use of org.androidannotations.annotations.Trace in project androidannotations by androidannotations.
the class TraceHandler method extractTag.
private String extractTag(Element element) {
Trace annotation = element.getAnnotation(Trace.class);
String tag = annotation.tag();
if (Trace.DEFAULT_TAG.equals(tag)) {
tag = element.getEnclosingElement().getSimpleName().toString();
}
return trimLogTag(tag);
}
use of org.androidannotations.annotations.Trace in project androidannotations by androidannotations.
the class ValidatorHelper method hasValidLogLevel.
public void hasValidLogLevel(Element element, ElementValidation valid) {
Trace annotation = element.getAnnotation(Trace.class);
Integer level = annotation.level();
if (!VALID_LOG_LEVELS.contains(level)) {
valid.addError("Unrecognized log level.");
}
}
Aggregations