// declare a class that has fields to be listed class Fields declare static field1 = "this is a static field. it will not be listed" declare field2 declare field3 declare field4 end // list all the fields in the class for fieldname in Fields.getFieldNames() println fieldname end