Record Class PythonAstParser.TransformResult
java.lang.Object
java.lang.Record
io.micronaut.python.processing.PythonAstParser.TransformResult
- Record Components:
originalSource- The original sourcecode- The transformed coderuntimeCodeSupplier- Produces the runtime code for diagnostics on demanddecorators- The decoratorsjavaClassImports- The Java class importsexportedTypes- The types that have Micronaut decoratorsallClassNames- All class names defined in the sourcevalidationErrors- Validation errors found while transforming the sourcevalidationWarnings- Diagnostics found while transforming the source that do not fail the compilation
- Enclosing class:
PythonAstParser
public static record PythonAstParser.TransformResult(org.graalvm.polyglot.Source originalSource, String code, Supplier<String> runtimeCodeSupplier, Map<String,String> decorators, Map<String, List<Map<String,String>>> javaClassImports, List<String> exportedTypes, List<String> allClassNames, List<String> validationErrors, List<String> validationWarnings)
extends Record
The result of a transformation.
-
Constructor Summary
ConstructorsConstructorDescriptionTransformResult(org.graalvm.polyglot.Source originalSource, String code, Supplier<String> runtimeCodeSupplier, Map<String, String> decorators, Map<String, List<Map<String, String>>> javaClassImports, List<String> exportedTypes, List<String> allClassNames, List<String> validationErrors) A result without warnings.TransformResult(org.graalvm.polyglot.Source originalSource, String code, Supplier<String> runtimeCodeSupplier, Map<String, String> decorators, Map<String, List<Map<String, String>>> javaClassImports, List<String> exportedTypes, List<String> allClassNames, List<String> validationErrors, List<String> validationWarnings) Creates an instance of aTransformResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallClassNamesrecord component.code()Returns the value of thecoderecord component.Returns the value of thedecoratorsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexportedTypesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thejavaClassImportsrecord component.org.graalvm.polyglot.SourceReturns the value of theoriginalSourcerecord component.The runtime source rendered for diagnostics.Returns the value of theruntimeCodeSupplierrecord component.org.graalvm.polyglot.Sourcefinal StringtoString()Returns a string representation of this record class.org.graalvm.polyglot.SourceReturns the value of thevalidationErrorsrecord component.Returns the value of thevalidationWarningsrecord component.
-
Constructor Details
-
TransformResult
public TransformResult(org.graalvm.polyglot.Source originalSource, String code, Supplier<String> runtimeCodeSupplier, Map<String, String> decorators, Map<String, List<Map<String, String>>> javaClassImports, List<String> exportedTypes, List<String> allClassNames, List<String> validationErrors) A result without warnings.- Parameters:
originalSource- The original sourcecode- The transformed coderuntimeCodeSupplier- Produces the runtime code for diagnostics on demanddecorators- The decoratorsjavaClassImports- The Java class importsexportedTypes- The types that have Micronaut decoratorsallClassNames- All class names defined in the sourcevalidationErrors- Validation errors found while transforming the source
-
TransformResult
public TransformResult(org.graalvm.polyglot.Source originalSource, String code, Supplier<String> runtimeCodeSupplier, Map<String, String> decorators, Map<String, List<Map<String, String>>> javaClassImports, List<String> exportedTypes, List<String> allClassNames, List<String> validationErrors, List<String> validationWarnings) Creates an instance of aTransformResultrecord class.- Parameters:
originalSource- the value for theoriginalSourcerecord componentcode- the value for thecoderecord componentruntimeCodeSupplier- the value for theruntimeCodeSupplierrecord componentdecorators- the value for thedecoratorsrecord componentjavaClassImports- the value for thejavaClassImportsrecord componentexportedTypes- the value for theexportedTypesrecord componentallClassNames- the value for theallClassNamesrecord componentvalidationErrors- the value for thevalidationErrorsrecord componentvalidationWarnings- the value for thevalidationWarningsrecord component
-
-
Method Details
-
transformedSource
public org.graalvm.polyglot.Source transformedSource() -
runtimeCode
The runtime source rendered for diagnostics. It is computed on first access.- Returns:
- The runtime code
-
runtimeSource
public org.graalvm.polyglot.Source runtimeSource() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
originalSource
public org.graalvm.polyglot.Source originalSource()Returns the value of theoriginalSourcerecord component.- Returns:
- the value of the
originalSourcerecord component
-
code
-
runtimeCodeSupplier
Returns the value of theruntimeCodeSupplierrecord component.- Returns:
- the value of the
runtimeCodeSupplierrecord component
-
decorators
Returns the value of thedecoratorsrecord component.- Returns:
- the value of the
decoratorsrecord component
-
javaClassImports
Returns the value of thejavaClassImportsrecord component.- Returns:
- the value of the
javaClassImportsrecord component
-
exportedTypes
Returns the value of theexportedTypesrecord component.- Returns:
- the value of the
exportedTypesrecord component
-
allClassNames
Returns the value of theallClassNamesrecord component.- Returns:
- the value of the
allClassNamesrecord component
-
validationErrors
Returns the value of thevalidationErrorsrecord component.- Returns:
- the value of the
validationErrorsrecord component
-
validationWarnings
Returns the value of thevalidationWarningsrecord component.- Returns:
- the value of the
validationWarningsrecord component
-