Class RecordPatternRetrofittingTaskListener
java.lang.Object
com.github.bsideup.jabel.RecordPatternRetrofittingTaskListener
- All Implemented Interfaces:
TaskListener
Replaces
MatchException catch clauses, generated by the compiler for record patterns unpacking,
by RuntimeException.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRecordPatternRetrofittingTaskListener(com.sun.tools.javac.util.Context context) -
Method Summary
Modifier and TypeMethodDescriptionvoidcom.sun.tools.javac.code.Symbol.OperatorSymbolcom.sun.tools.javac.code.Symbol.MethodSymbolvoidRegisters a virtualMatchExceptionsymbol to make the compiler happy.booleanisMatchException(com.sun.tools.javac.tree.JCTree t) void
-
Constructor Details
-
RecordPatternRetrofittingTaskListener
public RecordPatternRetrofittingTaskListener(com.sun.tools.javac.util.Context context)
-
-
Method Details
-
started
- Specified by:
startedin interfaceTaskListener
-
finished
- Specified by:
finishedin interfaceTaskListener
-
isMatchException
public boolean isMatchException(com.sun.tools.javac.tree.JCTree t) -
injectMatchException
public void injectMatchException()Registers a virtualMatchExceptionsymbol 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()
-