java.lang.Object
net.i2p.router.Tuner.I2PTunnelReflector
- Enclosing class:
Tuner
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 Summary
ConstructorsModifierConstructorDescriptionprivateMirrors the tunnel parameters into the running context.Method Summary
All MethodsModifier and TypeMethodDescription(package private) static doubleinvokeGetDouble(String methodName) Calls a static double getter via reflection.(package private) static intinvokeGetInt(String methodName) Calls a static int getter via reflection.(package private) static longinvokeGetLong(String methodName) Calls a static long getter via reflection.(package private) static voidinvokeSetInt(String methodName, int value) Calls a static int setter via reflection.(package private) static voidinvokeSetLong(String methodName, long value) Calls a static long setter via reflection.
Constructor Details
I2PTunnelReflector
private I2PTunnelReflector()Mirrors the tunnel parameters into the running context.
Method Details
invokeGetInt
Calls a static int getter via reflection.- Parameters:
methodName- the getter to call- Returns:
- the value, -1 if it cannot be resolved
invokeGetDouble
Calls a static double getter via reflection. Returns-1.0dwhen 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
Calls a static int setter via reflection.- Parameters:
methodName- the setter to callvalue- the value to set
invokeGetLong
Calls a static long getter via reflection.- Parameters:
methodName- the getter to call- Returns:
- the value, -1 if it cannot be resolved
invokeSetLong
Calls a static long setter via reflection.- Parameters:
methodName- the setter to callvalue- the value to set