Class Subject.InstructionSubject

  • All Implemented Interfaces:
    Subject
    Enclosing interface:
    Subject

    public static final class Subject.InstructionSubject
    extends Object
    implements Subject
    • Constructor Detail

      • InstructionSubject

        public InstructionSubject​(Instruction instruction,
                                  int index,
                                  EvalContext context)
        Binds the cursor to one instruction of a method body.
        Parameters:
        instruction - the instruction to bind
        index - its position in the body
        context - the shared evaluation context
    • Method Detail

      • instruction

        public Instruction instruction()
        Returns:
        the bound instruction
      • index

        public int index()
        Returns:
        the instruction's position in the method body
      • kind

        public SubjectKind kind()
        Specified by:
        kind in interface Subject
        Returns:
        which variant this subject is, selecting the attributes that apply to it
      • context

        public EvalContext context()
        Specified by:
        context in interface Subject
        Returns:
        the evaluation context shared across every subject in a run