Class ProxyQuantityFactory.GenericHandler<Q extends javax.measure.Quantity<Q>>

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler
    Enclosing class:
    ProxyQuantityFactory<Q extends javax.measure.Quantity<Q>>

    private static final class ProxyQuantityFactory.GenericHandler<Q extends javax.measure.Quantity<Q>>
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler
    The method invocation handler for implementation backed by any kind of Number. This is a fall back used when no specialized handler is available for the number type.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) javax.measure.Unit<Q> unit  
      (package private) java.lang.Number value  
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericHandler​(java.lang.Number value, javax.measure.Unit<Q> unit)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • unit

        final javax.measure.Unit<Q extends javax.measure.Quantity<Q>> unit
      • value

        final java.lang.Number value
    • Constructor Detail

      • GenericHandler

        GenericHandler​(java.lang.Number value,
                       javax.measure.Unit<Q> unit)
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler