java.lang.Object
net.i2p.router.Tuner.I2PTunnelReflector
Enclosing class:
Tuner

private static class Tuner.I2PTunnelReflectorextends Object
Reflection helper for accessing TunnelControllerGroup across module boundaries. i2ptunnel is not compiled into the router module, so we reflect; the class behind each name comes from Tuner._reflectorTargets.
  • Constructor Details

    • I2PTunnelReflector

      private I2PTunnelReflector()
      Mirrors the tunnel parameters into the running context.
  • Method Details

    • invokeGetInt

      static int invokeGetInt(String methodName)
      Calls a static int getter via reflection.
      Parameters:
      methodName - the getter to call
      Returns:
      the value, -1 if it cannot be resolved
    • invokeGetDouble

      static double invokeGetDouble(String methodName)
      Calls a static double getter via reflection. Returns -1.0d when the class or method cannot be resolved — a sentinel the caller must treat as "no data", not as a measurement.
      Parameters:
      methodName - the getter to call
      Returns:
      the value, -1.0 if it cannot be resolved
    • invokeSetInt

      static void invokeSetInt(String methodName, int value)
      Calls a static int setter via reflection.
      Parameters:
      methodName - the setter to call
      value - the value to set
    • invokeGetLong

      static long invokeGetLong(String methodName)
      Calls a static long getter via reflection.
      Parameters:
      methodName - the getter to call
      Returns:
      the value, -1 if it cannot be resolved
    • invokeSetLong

      static void invokeSetLong(String methodName, long value)
      Calls a static long setter via reflection.
      Parameters:
      methodName - the setter to call
      value - the value to set