Class I18nFormatterTreeUtil.I18nFormatCall
- java.lang.Object
-
- org.checkerframework.checker.i18nformatter.I18nFormatterTreeUtil.I18nFormatCall
-
- Enclosing class:
- I18nFormatterTreeUtil
public class I18nFormatterTreeUtil.I18nFormatCall extends java.lang.Object
Represents a format method invocation in the syntax tree.An I18nFormatCall instance can only be instantiated by the createFormatForCall method.
-
-
Constructor Summary
Constructors Constructor Description I18nFormatCall(com.sun.source.tree.MethodInvocationTree tree, AnnotatedTypeFactory atypeFactory)
Creates anI18nFormatCall
for the given method invocation tree.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I18nConversionCategory[]
getFormatCategories()
Returns the conversion category for every parameter.FormatterTreeUtil.Result<I18nFormatterTreeUtil.FormatType>
getFormatType()
java.lang.String
getInvalidError()
FormatterTreeUtil.Result<I18nFormatterTreeUtil.FormatType>
getInvalidInvocationType()
FormatterTreeUtil.Result<FormatterTreeUtil.InvocationType>
getInvocationType()
Returns the type of method invocation.FormatterTreeUtil.Result<javax.lang.model.type.TypeMirror>[]
getParamTypes()
com.sun.source.tree.MethodInvocationTree
getTree()
Returns the AST node for the call.boolean
isValidFormatForInvocation()
boolean
isValidParameter(I18nConversionCategory formatCat, javax.lang.model.type.TypeMirror paramType)
java.lang.String
toString()
-
-
-
Constructor Detail
-
I18nFormatCall
public I18nFormatCall(com.sun.source.tree.MethodInvocationTree tree, AnnotatedTypeFactory atypeFactory)
Creates anI18nFormatCall
for the given method invocation tree.- Parameters:
tree
- method invocation treeatypeFactory
- type factory
-
-
Method Detail
-
getTree
public com.sun.source.tree.MethodInvocationTree getTree()
Returns the AST node for the call.- Returns:
- the AST node for the call
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getFormatType
public FormatterTreeUtil.Result<I18nFormatterTreeUtil.FormatType> getFormatType()
-
getInvalidError
public final java.lang.String getInvalidError()
-
isValidFormatForInvocation
public boolean isValidFormatForInvocation()
-
getInvocationType
public final FormatterTreeUtil.Result<FormatterTreeUtil.InvocationType> getInvocationType()
Returns the type of method invocation.- See Also:
FormatterTreeUtil.InvocationType
-
getInvalidInvocationType
public FormatterTreeUtil.Result<I18nFormatterTreeUtil.FormatType> getInvalidInvocationType()
-
getFormatCategories
public final I18nConversionCategory[] getFormatCategories()
Returns the conversion category for every parameter.- See Also:
I18nConversionCategory
-
getParamTypes
public final FormatterTreeUtil.Result<javax.lang.model.type.TypeMirror>[] getParamTypes()
-
isValidParameter
public boolean isValidParameter(I18nConversionCategory formatCat, javax.lang.model.type.TypeMirror paramType)
-
-