public class FormatterTreeUtil.FormatCall extends Object
| Constructor and Description |
|---|
FormatCall(MethodInvocationTree node,
AnnotatedTypeFactory atypeFactory) |
| Modifier and Type | Method and Description |
|---|---|
ConversionCategory[] |
getFormatCategories()
Returns the conversion category for every parameter.
|
FormatterTreeUtil.Result<FormatterTreeUtil.InvocationType> |
getInvocationType()
Returns the type of method invocation.
|
FormatterTreeUtil.Result<TypeMirror>[] |
getParamTypes()
Returns the type of the function's parameters.
|
FormatterTreeUtil.Result<String> |
hasFormatAnnotation()
Returns null if the format-string argument's type is annotated as
@Format. |
boolean |
isParameterNull(TypeMirror type)
Checks if the parameter returned from
getParamTypes() is a null
expression. |
boolean |
isValidParameter(ConversionCategory formatCat,
TypeMirror paramType)
Checks if the type of a parameter returned from
getParamTypes() 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>[] getParamTypes()
isValidParameter and isParameterNull to work with the result.public final boolean isValidParameter(ConversionCategory formatCat, TypeMirror paramType)
getParamTypes() is valid for the
passed ConversionCategory.public final boolean isParameterNull(TypeMirror type)
getParamTypes() is a null
expression.