2

what the below code line does in java.

private static final String PERMISSIONS_KEY = BaseActionStepsHandler.class.getName() + ".USER.ROLES";

Note:

BaseActionStepsHandler is java class,and it is extended in another java class InvConfirmActionStepsHandler . The above code is declared in BaseActionStepsHandler.java and it is called in InvConfirmActionStepsHandler class like below

private static final String PERMISSIONS_KEY = BaseActionStepsHandler.class.getName() + ".USER.ROLES";

what does it mean.??

1 Answer 1

6

This creates a constant that holds the fully qualified name of the BaseActionStepsHandler class concatenated with .USER.ROLES.

So, its value will be:

com.some.pkg.BaseActionStepsHandler.USER.ROLES

It uses the so called class-literal - ClassName.class, which is a Class object for the class in question.

Sign up to request clarification or add additional context in comments.

2 Comments

can you explain the last line little more.. It uses the so called class-literal - ClassName.class, which is a Class object for the class in question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.