Presumably, you want to access an instance field of your Runnable
instances. To access them you will need to downcast the Runnable
to the actual class of your Runnable
class, and then access the fields via the downcast reference. Or better still, make the fields private and access them via getter / setter calls on the reference.
This could be awkward if your Runnable
is an anonymous inner class. In that case, you may need to turn it into a named class: either nested, inner or top level.
On the other hand, if you are talking about static
fields or methods of the Runnable
implementation class, you can just use them as you would normally ... provided that the access modifiers allow this.