01_user_documentation:07_rgg_xl:02_xl:09_java_addition:implicit_conversion:03_node
Table of Contents
To Node
Object can also be automatically converted to Nodes. Which can happen in a production statement. By default, Objects are wrapped into a ObjectNode if added to a graph. But, it is possible to declare a specific conversion method.
toNode
A class has to declare the method toNode to be automatically transformed into the return of this method, when added in a production statement.
Note that:
- the original object that create the Node is not related automatically to the created node.
- module will ignore this method
class A { Node toNode(){ return new F(); } } protected void init () [ Axiom ==> A; ]
produceNode
The interface de.grogra.imp.objects.ProducingNode enable any interface (or class) that implements it to be handled by the producer. The difference with the toNode method is that this can be declared in an interface.
01_user_documentation/07_rgg_xl/02_xl/09_java_addition/implicit_conversion/03_node.txt · Last modified: 2025/08/20 10:32 by gaetan
