1. A non-transitory computer-readable storage medium comprising computer executable instructions which when executed cause a processor to perform a method for automation of consistent lock management, said instructions comprising: requesting read access to a shared resource; receiving a first type of accessor object corresponding to said shared resource, wherein an accessor object class of said first type of accessor object comprises at least one read access function, and wherein said first type of accessor object obtains a read access lock on said shared resource; registering said first type of accessor object with a resource access manager, wherein said resource access manager tracks and manages accessor objects; accessing said shared resource through said first type of accessor object; requesting write access to a second shared resource; receiving a second type of accessor object corresponding to said second shared resource, wherein said second type of accessor object obtains a write access lock on said second shared resource; accessing said second shared resource through said second type of accessor object, wherein a second accessor object class comprises at least one write access function; preventing code compilation for code operations that request the first type of accessor object to perform a write access function by programming said first type of accessor object prior to compile time; detecting an attempt to perform a write operation on said first type of accessor object; and promoting said read access lock to a write access lock, wherein said promoting comprises obtaining another second type of accessor object corresponding to said first type of accessor object.