I have an unusual super class.
it instantiates the subclass using reflection, and calls a subclass method in the main method
ie, String processor= System.getProperty(PROCESSOR_CLASS); sub = (ClassName) class.forName(processor).newInstance();
sub.init(props);
I am writing a wrapper (sub) for the super class that will also be abstract, and will be used as a base class by a large number of subclasses.
The problem I have is that props contains sensitive information. I need to prevent a subclass that extends from sub from using reflection to access the props.
Can anyone give me an example of doing this using the Java security manager, or some other method?
Thanks very much for your help