This is the java.lang.instrument equivalent of 6306942.
java.lang.instrument needs a function to test if a class is modifiable with retransformClasses or redefineClasses. This will allow an agent to build a list of modifable classes to pass. Currently if any of the classes in the list is not modifiable the retransform (or redefine) will return an error.
This is partically important in cases where isRetransformClassesSupported() / isRedefineClassesSupported() is true but some classes can not be retransformed/redefined (eg: in our implementation where a late-binding agent is loaded into a VM with class data sharing enabled - in that case we can only retransform/redefine shared that aren't shared).