Introduced:
We've explored how agents can access VMS using environment pointers (object-level operations), and now we're talking about letting agents access the fields of the class using an environment pointer.
Category 10: Field access
A.getfieldname. Getting a field name for a class
Jvmtierrorgetfieldname (jvmtienv* env, Jclass Klass, Jfieldid field, char** name_ptr, char** signature_ptr, char** generic_ptr)
B.getfielddeclaringclass. Gets the class that declares the field
Jvmtierrorgetfielddeclaringclass (jvmtienv* env, Jclass Klass, Jfieldid field, Jclass* Dec LARING_CLASS_PTR)
C.getfieldmodifiers. Gets the access modifier for a field of a class
Jvmtierrorgetfieldmodifiers (jvmtienv* env, Jclass Klass, Jfieldid field, jint* Modifiers_ ptr
D.isfieldsynthetic. Determine if a field in a class is a fictional field
Jvmtierrorisfieldsynthetic (jvmtienv* env, Jclass Klass, Jfieldid field, jboolean* Is_synt HETIC_PTR)
The so-called imaginary fields are the fields generated by the compiler rather than directly defined in the source code.
This article is from the "cohesion of parallel Lines" blog, please be sure to keep this source http://supercharles888.blog.51cto.com/609344/1587889
JPDA Architecture Research 15-agent access VMS using environment pointers (field access)