public class FormatterTreeUtil.FormatCall extends Object
Modifier and Type | Method and Description |
---|---|
FormatterTreeUtil.Result<String> |
errMissingFormatAnnotation()
Returns an error description if the format-string argument's type is not
annotated as
@Format . |
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.
|
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 final FormatterTreeUtil.Result<String> errMissingFormatAnnotation()
@Format
. Returns null if it is annotated.@Format
, or
null if it ispublic final FormatterTreeUtil.Result<FormatterTreeUtil.InvocationType> getInvocationType()
FormatterTreeUtil.InvocationType
public final ConversionCategory[] getFormatCategories()
ConversionCategory
public 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