Hi.
> Here is the code fragment:
Ok.
I'd generate
final Port port;
if (type == Port.SIGNAL_PORT)
{
port = new SignalPort();
}
else if (type == Port.BUS_SLAVE_PORT)
{
...
}
else
{
throw new IllegalArgumentException(...);
}
I already told you how to get enums from the class.
Correspondence between enums and classes is your thing, you should know how to
do it.
Conditionals are done with block._if(...)._then(...)._else.
You only need to define correspondence between your enums and classes somehow.
Bye.
/lexi