Skip to main content

[jsr363-experts] PI

  • From: Martin Desruisseaux < >
  • To:
  • Subject: [jsr363-experts] PI
  • Date: Sun, 14 Dec 2014 20:43:30 +0900
  • Organization: Geomatys

Le 14/12/14 19:59, Werner Keil a écrit :
> Other implementations may use say a NoSQL db, etc. So keeping the
> abstract base class in implementations is reasonable, but pulling just
> one implementing class out of that hierarchy sounds comtradicting.
But nobody is proposing that...


> IMHO if SI went into API (so we find a way to solve all the RI
> dependencies in it;-) so should AbstractSystemOfUnits.
>
No, they would be no dependency and no need for AbstractSystemUnit. Just
use ServiceLoader and current Unit public API, nothing else. No need for
direct dependency to anything from the RI. Example:

    public final class SI {
        public static final Unit<Length> METRE;
        public static final Unit<Time> SECOND;

        static {
            SystemOfUnits sys = null;
            for (SystemOfUnitsProvider p : 
ServiceLoader.load(SystemOfUnitsProvider.class)) {
                sys = p.getSystemOfUnits();
                // TODO: what to do if we find more than one provider on the 
classpath?
            }
            // TODO: what to do if we find no provider on the classpath?
            METRE = sys.getUnit(Length.class);
            SECOND = sys.getUnit(Time.class);
            // etc.
        }
    }


    Martin



[jsr363-experts] Should JSR-363 API provide the SI class?

Martin Desruisseaux 12/13/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Werner Keil 12/13/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Martin Desruisseaux 12/13/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Werner Keil 12/13/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Werner Keil 12/13/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Martin Desruisseaux 12/14/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Werner Keil 12/14/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Martin Desruisseaux 12/14/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Werner Keil 12/14/2014

[jsr363-experts] PI

Martin Desruisseaux 12/14/2014

[jsr363-experts] Re: PI

Werner Keil 12/14/2014

[jsr363-experts] Re: PI

Martin Desruisseaux 12/14/2014

[jsr363-experts] Re: PI

Werner Keil 12/14/2014

[jsr363-experts] Re: PI

Werner Keil 12/17/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Leonardo Lima 12/16/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Martin Desruisseaux 12/16/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Leonardo Lima 12/16/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Martin Desruisseaux 12/16/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Werner Keil 12/16/2014

[jsr363-experts] Re: Should JSR-363 API provide the SI class?

Leonardo Lima 12/16/2014
 
 
Close
loading
Please Confirm
Close