Example: getNext method (JavaPropertyCollection class)
This script prints out the position of MAX_VALUE within the collection.
Dim mySession As JavaSession
Dim myClass As JavaClass
Dim myProperty As JavaProperty
Dim myPCollection As JavaPropertyCollection
Set mySession = new JavaSession()
' Get Java "java.lang.Integer" class
Set myClass = mySession.GetClass("java/lang/Integer")
' Get a list of all methods belonging
' to the java.lang.Integer class
Set myPCollection = myClass.getClassProperties()
Set myProperty = myPCollection.getFirst()
Do
If myProperty.PropertyName = "MAX_VALUE" then
Print "MAX_VALUE is located at the " & _
myPCollection.current _
& " position within the collection"
Exit Do
End If
Set myProperty = myPCollection.getNext()
Loop While myPCollection.Current <> 1
' Because getNext loops back to 1 when the end is reached