Class ReflectionTestVisitor

All Implemented Interfaces:
TreeVisitor<Void,Void>

public final class ReflectionTestVisitor extends BaseTypeVisitor<ReflectionTestAnnotatedTypeFactory>
Visitor for a simple type system to test reflection resolution.
  • Constructor Details

    • ReflectionTestVisitor

      public ReflectionTestVisitor(BaseTypeChecker checker)
  • Method Details

    • createTypeFactory

      protected ReflectionTestAnnotatedTypeFactory createTypeFactory()
      Description copied from class: BaseTypeVisitor
      Constructs an instance of the appropriate type factory for the implemented type system.

      The default implementation uses the checker naming convention to create the appropriate type factory. If no factory is found, it returns BaseAnnotatedTypeFactory. It reflectively invokes the constructor that accepts this checker and compilation unit tree (in that order) as arguments.

      Subclasses have to override this method to create the appropriate visitor if they do not follow the checker naming convention.

      Overrides:
      createTypeFactory in class BaseTypeVisitor<ReflectionTestAnnotatedTypeFactory>
      Returns:
      the appropriate type factory