Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.palominolabs.metrics.jersey;
 
 
 final class MetricAnnotationFeatureResolver {

    
Check the method, then the class, for

Parameters:
am resource method
checker checker
Returns:
EnabledState.ON if feature enabled, EnabledState.OFF if feature disabled, EnabledState.UNSPECIFIED otherwise
ResourceMetrics:
and use the specified checker to see if the feature is enabled or disabled.
        // check method, then class
        for (ResourceMetrics ann : new ResourceMetrics[]{am.getAnnotation(ResourceMetrics.class), am
            .getResource().getAnnotation(ResourceMetrics.class)}) {
            if (ann != null) {
                if (checker.check(ann)) {
                    return .;
                } else {
                    return .;
                }
            }
        }
        return .;
    }
New to GrepCode? Check out our FAQ X