# @ObjectFactory returning a record: the factory's object is the result, and nothing is copied into it source : Pair[name=pen, qty=3] result : Boxed[name=from-the-factory, qty=0] compiled with unmappedTargetPolicy = ERROR, and no error was reported --- the generated method --- public Probes.Boxed toRecord(Probes.Pair pair) { if ( pair == null ) { return null; } Probes.Boxed boxed = create( pair ); return boxed; }