public class FormatterTreeUtil.FormatCall extends Object
| Constructor and Description |
|---|
FormatCall(MethodInvocationTree node,
AnnotatedTypeFactory atypeFactory) |
| Modifier and Type | Method and Description |
|---|---|
FormatterTreeUtil.Result<TypeMirror>[] |
getArgTypes()
Returns the types of the arguments to the call.
|
ConversionCategory[] |
getFormatCategories()
Returns the conversion category for every parameter.
|
FormatterTreeUtil.Result<FormatterTreeUtil.InvocationType> |
getInvocationType()
Returns the type of method invocation.
|
FormatterTreeUtil.Result<String> |
hasFormatAnnotation()
Returns null if the format-string argument's type is annotated as
@Format. |
boolean |
isArgumentNull(TypeMirror type)
Checks if the argument returned from
getArgTypes() is a null expression. |
boolean |
isValidArgument(ConversionCategory formatCat,
TypeMirror argType)
Checks if the type of an argument returned from
getArgTypes() is valid for the
passed ConversionCategory. |
public FormatCall(MethodInvocationTree node, AnnotatedTypeFactory atypeFactory)
public final FormatterTreeUtil.Result<String> hasFormatAnnotation()
@Format.
Returns an error description if not annotated as @Format.public final FormatterTreeUtil.Result<FormatterTreeUtil.InvocationType> getInvocationType()
FormatterTreeUtil.InvocationTypepublic final ConversionCategory[] getFormatCategories()
ConversionCategorypublic final FormatterTreeUtil.Result<TypeMirror>[] getArgTypes()
isValidArgument(org.checkerframework.checker.formatter.qual.ConversionCategory, javax.lang.model.type.TypeMirror) and isArgumentNull(javax.lang.model.type.TypeMirror) to work with the result.public final boolean isValidArgument(ConversionCategory formatCat, TypeMirror argType)
getArgTypes() is valid for the
passed ConversionCategory.formatCat - a format specifierargType - an argument typepublic final boolean isArgumentNull(TypeMirror type)
getArgTypes() is a null expression.type - a typenull expression