How about introducing a builder API:
public My getInstance(Arg1 arg1, ObjectInputStream ois, Arg2 arg2) {...}
public SerialReflectionFactory substitute() {
return SerialReflectionFactory.builder()
.factory(My.class)
.method("getInstance", ARG_TYPES)
.param(p1)
.streamParam()
.param(p2)
.build();
}
where "streamParam()" would indicate a placeholder for the actual input
stream.
Thanks,
Michal
On Monday, March 10, 2014 10:48:29 AM Peter wrote:
> I'm open to suggestion.
>
> Regards,
>
> Peter.
>
> ----- Original message -----
>
> > Peter,
> >
> > Can your SerialReflectionFactory expose an API to interact with the
> > stream? It would be enough to be able to retrieve context Collection
> > from ObjectStreamContext.
> >
> > Thanks,
>
> <Attachment> Michał Kłeczek (XPro).vcf
--
Michał Kłeczek
XPro Sp. z o. o.
ul. Borowskiego 2
03-475 Warszawa
Polska
BEGIN:VCARD
ADR;TYPE=pref;TYPE=work:;;ul. Borowskiego 2;Warszawa;;03-475;Poland
EMAIL:[email protected]
FN:Michał Kłeczek
N:Kłeczek;Michał;;;
ORG:XPro Sp. z o. o.
UID:Zp8UeLZmq5
VERSION:3.0
END:VCARD