Class PythonProcessingSession
java.lang.Object
io.micronaut.python.processing.PythonProcessingSession
- All Implemented Interfaces:
AutoCloseable
Owns the initialized GraalPy processing context across multiple serialized compilations.
A session is not thread safe. Callers must serialize compilations that share it.
- Since:
- 5.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanReports whether GraalPy has been initialized.parser(ClassLoader classLoader, boolean incremental) Obtains the parser for a compilation, initializing GraalPy on first use.
-
Constructor Details
-
PythonProcessingSession
public PythonProcessingSession()
-
-
Method Details
-
parser
Obtains the parser for a compilation, initializing GraalPy on first use.- Parameters:
classLoader- The annotation processor class loaderincremental- Whether the compilation is incremental- Returns:
- The session parser
-
initialized
public boolean initialized()Reports whether GraalPy has been initialized.- Returns:
- Whether GraalPy has been initialized for this session
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-