Re: Pre-processing during build

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Mark Rotteveel <mark(at)lawinegevaar(dot)nl>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Pre-processing during build
Date: 2015-06-17 12:03:30
Message-ID: CAB=Je-HkWY+BH0ZiDVSkkop-V5MYKfHGsVO7MQfpkcJi-c+9cA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

>So getting this to work would need some form of reflection (to get the
right type at runtime based on the Java version)

Reflection is sufficient, isn't it?

I think reflection would be rather clean solution here.
It is more IDE-friendly and developer-friendly than pre-processing.
Reflection is much easier to debug than byte-code generation.

So, do you see drawbacks with using reflection to select the specific
implementation?

From implementation point of view it just replaces "preprocessing"
with some "Class.forName" and that is it.
It even allows to ship the same jar file and select implementation on the fly.

Vladimir

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christopher BROWN 2015-06-17 12:24:24 Re: Pre-processing during build
Previous Message Mark Rotteveel 2015-06-17 12:01:49 Re: Pre-processing during build