Class AnnotationMatcherUtils
java.lang.Object
com.google.errorprone.matchers.AnnotationMatcherUtils
Utilities for matching annotations.
- Author:
- mwacker@google.com (Mike Wacker)
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable com.sun.source.tree.ExpressionTree
getArgument
(com.sun.source.tree.AnnotationTree annotationTree, String name) Gets the value for an argument, or null if the argument does not exist.
-
Method Details
-
getArgument
public static @Nullable com.sun.source.tree.ExpressionTree getArgument(com.sun.source.tree.AnnotationTree annotationTree, String name) Gets the value for an argument, or null if the argument does not exist.- Parameters:
annotationTree
- the AST node for the annotationname
- the name of the argument whose value to get- Returns:
- the value of the argument, or null if the argument does not exist
-