java.lang.Object
net.i2p.router.Tuner.StreamingReflector
- Enclosing class:
Tuner
Reflection helper for the streaming module's tuned statics.
Streaming depends on router, not vice versa, so the calls are reflective. Which streaming class declares a name comes from Tuner._reflectorTargets, not from the call site, and the lookup goes through findStaticMethod() because ConnectionOptions and Connection are non-public classes whose public statics throw IllegalAccessException on a bare invoke.
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMirrors the streaming parameters into the running context.Method Summary
All MethodsModifier and TypeMethodDescription(package private) static intinvokeGetInt(String methodName) Calls a static int getter via reflection.(package private) static voidinvokeSetInt(String methodName, int value) Calls a static int setter via reflection.
Constructor Details
StreamingReflector
private StreamingReflector()Mirrors the streaming 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
invokeSetInt
Calls a static int setter via reflection.- Parameters:
methodName- the setter to callvalue- the value to set