Class FormatterTreeUtil.FormatCall
java.lang.Object
org.checkerframework.checker.formatter.FormatterTreeUtil.FormatCall
- Enclosing class:
- FormatterTreeUtil
Represents a format method invocation in the syntax tree.
- 
Method SummaryModifier and TypeMethodDescriptionReturns an error description if the format-string argument's type is not annotated as@Format.final FormatterTreeUtil.Result<TypeMirror>[]Returns the types of the arguments to the call.final ConversionCategory[]Returns the conversion category for every parameter.Returns the type of method invocation.final booleanisArgumentNull(TypeMirror type) Checks if the argument returned fromgetArgTypes()is anullexpression.final booleanisValidArgument(ConversionCategory formatCat, TypeMirror argType) Checks if the type of an argument returned fromgetArgTypes()is valid for the passed ConversionCategory.
- 
Method Details- 
errMissingFormatAnnotationReturns an error description if the format-string argument's type is not annotated as@Format. Returns null if it is annotated.- Returns:
- an error description if the format string is not annotated as @Format, or null if it is
 
- 
getInvocationTypeReturns the type of method invocation.- See Also:
 
- 
getFormatCategoriesReturns the conversion category for every parameter.- Returns:
- the conversion categories of all the parameters
- See Also:
 
- 
getArgTypesReturns the types of the arguments to the call. UseisValidArgument(org.checkerframework.checker.formatter.qual.ConversionCategory, javax.lang.model.type.TypeMirror)andisArgumentNull(javax.lang.model.type.TypeMirror)to work with the result.- Returns:
- the types of the arguments to the call
 
- 
isValidArgumentChecks if the type of an argument returned fromgetArgTypes()is valid for the passed ConversionCategory.- Parameters:
- formatCat- a format specifier
- argType- an argument type
- Returns:
- true if the argument can be passed to the format specifier
 
- 
isArgumentNullChecks if the argument returned fromgetArgTypes()is anullexpression.- Parameters:
- type- a type
- Returns:
- true if the argument is a nullexpression
 
 
-