in src/main/java/com/amazon/checkerframework/cryptopolicy/CryptoPolicyComplianceVisitor.java [148:164]
private List<String> getLowerCasedStringValAnnotations(final ExpressionTree expressionTree) {
// get the actual Strings that the rhs can resolve to
ValueAnnotatedTypeFactory valueAnnotatedTypeFactory =
(ValueAnnotatedTypeFactory) atypeFactory.getTypeFactoryOfSubchecker(ValueChecker.class);
AnnotatedTypeMirror valueType = valueAnnotatedTypeFactory.getAnnotatedType(expressionTree);
AnnotationMirror stringValAnno = valueType.getAnnotation(StringVal.class);
// if the rhs doesn't have any constant-time strings that it can resolve to, give up
if (stringValAnno == null) {
return new ArrayList<>();
}
return AnnotationUtils.getElementValueArray(stringValAnno, "value", String.class, true)
.stream()
.map(String::toLowerCase)
.collect(Collectors.toList());
}