public class FormatterTreeUtil.FormatCall
extends java.lang.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<javax.lang.model.type.TypeMirror>[] |
getParamTypes()
Returns the type of the function's parameters.
|
FormatterTreeUtil.Result<java.lang.String> |
hasFormatAnnotation()
Returns null if the format-string argument's type is annotated as
@Format . |
boolean |
isParameterNull(javax.lang.model.type.TypeMirror type)
Checks if the parameter returned from
getParamTypes() is a null
expression. |
boolean |
isValidParameter(ConversionCategory formatCat,
javax.lang.model.type.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<java.lang.String> hasFormatAnnotation()
@Format
.
Returns an error description if not annotated as @Format
.public final FormatterTreeUtil.Result<FormatterTreeUtil.InvocationType> getInvocationType()
FormatterTreeUtil.InvocationType
public final ConversionCategory[] getFormatCategories()
ConversionCategory
public final FormatterTreeUtil.Result<javax.lang.model.type.TypeMirror>[] getParamTypes()
isValidParameter
and isParameterNull
to work with the result.public final boolean isValidParameter(ConversionCategory formatCat, javax.lang.model.type.TypeMirror paramType)
getParamTypes()
is valid for the
passed ConversionCategory.public final boolean isParameterNull(javax.lang.model.type.TypeMirror type)
getParamTypes()
is a null
expression.