Class SameLenVisitor

All Implemented Interfaces:

public class SameLenVisitor extends BaseTypeVisitor<SameLenAnnotatedTypeFactory>
  • Constructor Details

  • Method Details

    • commonAssignmentCheck

      protected boolean commonAssignmentCheck(AnnotatedTypeMirror varType, AnnotatedTypeMirror valueType, Tree valueTree, @CompilerMessageKey String errorKey, Object... extraArgs)
      Merges SameLen annotations, then calls super.

      Checks the validity of an assignment (or pseudo-assignment) from a value to a variable and emits an error message (through the compiler's messaging interface) if it is not valid.

      commonAssignmentCheck in class BaseTypeVisitor<SameLenAnnotatedTypeFactory>
      varType - the annotated type of the variable
      valueType - the annotated type of the value
      valueTree - the location to use when reporting the error message
      errorKey - the error message key to use if the check fails
      extraArgs - arguments to the error message key, before "found" and "expected" types
      true if the check succeeds, false if an error message was issued