Thanks very much that worked perfectly. Hunter McMillen
On Wed, Dec 7, 2011 at 5:10 PM, Friedman-Hill, Ernest <[email protected]>wrote: > Nested enums, like nested classes, actually secretly have a name like > "UnitType$UnitTypes". I haven't tried this specifically for enums, but I > suspect this would work: > > engine.executeCommand("(import eisbot.proxy.types.UnitType$UnitTypes)"); > > ________________________________ > From: [email protected] [mailto:[email protected]] On > Behalf Of Hunter McMillen > Sent: Wednesday, December 07, 2011 4:27 PM > To: jess-users > Subject: JESS: [EXTERNAL] Access public enum inside of a class > > Hi everyone, > > I am trying to use an enum from one of my Java classes inside of Jess. I > read a forum post that said I could use the (import <enum-name>) feature to > import enums into Jess, but that only seems to work when the enum is itself > in a separate file. > > I have a class called UnitType, inside of it there is a public enum called > UnitTypes where all of the UnitTypes in my game are listed. In Java to > access this I would use UnitType.UnitTypes.<Element_in_enum> to get to the > enum >
