Class AbstractInvocationType

java.lang.Object
org.checkerframework.framework.util.typeinference8.types.AbstractExecutableType
org.checkerframework.framework.util.typeinference8.types.AbstractInvocationType

public class AbstractInvocationType extends AbstractExecutableType
An inference type for a method or constructor invocation. This is a wrapper around AnnotatedTypeMirror.AnnotatedExecutableType whose methods return AbstractType.
  • Constructor Details

    • AbstractInvocationType

      public AbstractInvocationType(AnnotatedTypeMirror.AnnotatedExecutableType annotatedExecutableType, ExecutableType executableType, ExpressionTree invocation, Java8InferenceContext context)
      Creates an invocation type for a method or constructor invocation.
      Parameters:
      annotatedExecutableType - annotated method or constructor type
      executableType - the Java executable type
      invocation - a method or constructor invocation
      context - the context
  • Method Details

    • getReturnType

      public AbstractType getReturnType(@Nullable Theta map)
      Returns the return type of this.
      Specified by:
      getReturnType in class AbstractExecutableType
      Parameters:
      map - a mapping from type variable to inference variable, or null to treat no type variable as an inference variable
      Returns:
      the return type of this
    • getParameterTypes

      public List<AbstractType> getParameterTypes(@Nullable Theta map, int size)
      Description copied from class: AbstractExecutableType
      Returns the formal parameter types of this executable.

      If this invocation uses varargs, then the vararg parameter is replaced by individual parameters and the result has length size. Otherwise, size is ignored and the result contains one element per declared formal parameter, plus one for the receiver if this is an unbound method reference.

      Specified by:
      getParameterTypes in class AbstractExecutableType
      Parameters:
      map - a mapping from type variable to inference variable, or null to treat no type variable as an inference variable
      size - the number of parameters to return; used to expand the vararg. It is ignored if this invocation does not use varargs.
      Returns:
      the formal parameter types of this executable