例: getValue メソッド

次のスクリプトは、コレクション内での MAX_VALUE の位置を出力します。

Dim mySession As JavaSession
Dim myClass As JavaClass
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 Properties belonging
' to the java.lang.Integer class
Set myPCollection = myClass.getClassProperties()

Print myPCollection.count & "Properties of the " _
	& myClass.ClassNAme & " class are :"
ForAll p in myPCollection
	If p.type <> 32 then	' If it's not an object
		Print p.PropertyName & _
      " (" & myPCollection.current _
		& ") and value is " & p.getValue()
	Else
		Print p.PropertyName & _
      " (" & myPCollection.current _
		& ") and value is " & p.getValue().toString()
	End If
End ForAll