referenceTypeId in jvmti

I'm implementing an agent using jvmti. I'm using the jdwp protocol to send and receive packets to and from a client. Many jdwp commands (see example below) utilize referenceTypeId (as well as objectId, methodId, etc). My question is this: Is there a way to get a referenceTypeId from the jvm using jvmti -- or is the referenceTypeId something that the agent is supposed to create and manage itself?

The following is from http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp-spec.html

referenceTypeID - Uniquely identifies a reference type in the target VM. It should not be assumed that for a particular class, the classObjectID and the referenceTypeID are the same. A particular reference type will be identified by exactly one ID in JDWP commands and replies throughout its lifetime A referenceTypeID is not reused to identify a different reference type, regardless of whether the referenced class has been unloaded.

And from the same document:

Object ids, reference type ids, field ids, method ids, and frame ids may be sized differently in different target VM implementations...

Reply Data of a JDWP Command that uses referenceTypeId (get All Classes)

--

-intn(number of reference types that follow)

--

repeated n times:

-byte(kind of following reference type)

-referenceTypeID (loaded reference type)

-string (the JNI signature of the loaded reference type)

-int (the current class status)

--

[1569 byte] By [JaMeSa] at [2007-11-26 21:57:49]
# 1
The referenceTypeID is not known to the VM or JVM TI. Instead, the JDWP agent has a map which can be used to map IDs to JNI refs (either JNI weak reference or global ref). I hope this helps.
alan.batemana at 2007-7-10 3:55:21 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
...exactly what I was looking for...thanx!.The documentation is confusing because it says that the id sizes may vary across vm implementations. However it seems like the vm should have nothing to do with the sizes. Instead the agent will determine the sizes.
JaMeSa at 2007-7-10 3:55:21 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...