Skip to Content
0
May 10, 2010 at 12:45 PM

SLIN You can no longer access protected components using a superclass refer

207 Views

I have made a class which has a super class.

I am using the super class because I want to make use of the 'protected' visibility to prevent executing this code in public.

The super class has generic methods which will be used by classes belonging to the same familiy.

I am calling a static method in the class but need to access protected instance methods in the super class.

To achieve this an instance of this super class will be created in the static method in order to call the protected instance methods.

Everything seems to work well but because of a habit I always use SLIN to check my code.

SLIN generates the message:

"You can no longer access protected components using a superclass reference"

With an internal message code : MESSAGE G-8

Could anyone tell how to correct this SLIN warning?

Should I make all those protected methods public?

Never use super classes again?

Or shouldn't I use static methods in a class which has a super class?

If somebody of SAP reads this... could the explanation of such cryptic messages be improved?

I can't find any notes using the text as a search criteria, also tried G-8...