static collection variable not accessible elsewhere
The only way I can think of to reproduce your error is to introduce a naming conflict. Here is a simple analogue:
public class Foo
{
public String property = 'abcde';
}
public class Bar
{
public static void doStuff()
{
Object foo = 42;
system.debug(Foo.property);
}
}
It seems like within your method you must have named some variable opportunities
, making it impossible to reference your domain class.