Search in sources :

Example 1 with Trace

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);
}
Also used : Trace(org.androidannotations.annotations.Trace)

Example 2 with Trace

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.");
    }
}
Also used : Trace(org.androidannotations.annotations.Trace)

Aggregations

Trace (org.androidannotations.annotations.Trace)2