troubleshooting Question

Public Variable Change

Avatar of bnrtech
bnrtech asked on
JavaWindows XP
9 Comments1 Solution425 ViewsLast Modified:
I have a Java project that I recently inherited and admittedly my Java skills are very rusty.  In this code there are several public variables.  Moving forward we would like to change these to private with getters and setters.  The problem lies in that there are many pieces of legacy code still in use by others, that I do not have access to, that access these public variables directly.  We are looking to add in an adapter layer of code so that their interface does not actually change, but we are stuck on how to update the variables.  Is there a way to detect when a public variables value has changed?  I was hoping there might be some type of listener implementation to handle this but I am having no luck right now.  Any suggestions?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros