Class RecordPatternRetrofittingTaskListener

java.lang.Object
com.github.bsideup.jabel.RecordPatternRetrofittingTaskListener
All Implemented Interfaces:
TaskListener

public class RecordPatternRetrofittingTaskListener extends Object implements TaskListener
Replaces MatchException catch clauses, generated by the compiler for record patterns unpacking, by RuntimeException.
  • Constructor Details

    • RecordPatternRetrofittingTaskListener

      public RecordPatternRetrofittingTaskListener(com.sun.tools.javac.util.Context context)
  • Method Details

    • started

      public void started(TaskEvent e)
      Specified by:
      started in interface TaskListener
    • finished

      public void finished(TaskEvent e)
      Specified by:
      finished in interface TaskListener
    • isMatchException

      public boolean isMatchException(com.sun.tools.javac.tree.JCTree t)
    • injectMatchException

      public void injectMatchException()
      Registers a virtual MatchException symbol to make the compiler happy.
    • getRuntimeExceptionConstructor

      public com.sun.tools.javac.code.Symbol.MethodSymbol getRuntimeExceptionConstructor()
    • getConcatOperator

      public com.sun.tools.javac.code.Symbol.OperatorSymbol getConcatOperator()