org.apache.velocity.tools.config.ValidScope Java Examples

The following examples show how to use org.apache.velocity.tools.config.ValidScope. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnnotatedVelocityToolsScanner.java    From velocity-spring-boot-project with Apache License 2.0 3 votes vote down vote up
private String getScope(Class<?> toolClass) {

        ValidScope validScope = findAnnotation(toolClass, ValidScope.class);

        if (validScope == null || ObjectUtils.isEmpty(validScope.value())) {
            return null;
        }

        // Take first element
        return validScope.value()[0];

    }