public class FormatterTreeUtil.FormatCall
extends java.lang.Object
Constructor and Description |
---|
FormatCall(com.sun.source.tree.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> |
isIllegalFormat()
Returns an error description if the format string cannot be satisfied,
Returns null if the format string does not contain syntactic errors.
|
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(com.sun.source.tree.MethodInvocationTree node, AnnotatedTypeFactory atypeFactory)
public final FormatterTreeUtil.Result<java.lang.String> isIllegalFormat()
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.