Class PythonValues
java.lang.Object
io.micronaut.python.processing.util.PythonValues
Converts the literal values the Python processor produces (decorator arguments, attribute
initialisers, parameter defaults) into plain Java values at the language boundary, so the rest of
the compiler never handles a polyglot
Value.
Literals map to their natural Java type: str to String, bool to
Boolean, int to Integer or Long, float to Double,
lists and tuples to List, dicts to Map. Host objects (a DecoratorDef, a
TypeRef, a Java class) pass through. A Python object that is none of these, for example a
dataclasses.Field, is kept as the Value it is.
- Since:
- 5.2.0
-
Method Summary
Modifier and TypeMethodDescriptionConverts a value received from the processor.Converts every value of a map received from the processor.Converts a polyglot value received from the processor.
-
Method Details
-
toJava
-
toJava
-
toJava
-