开发者

java variable declaration

开发者 https://www.devze.com 2023-01-06 17:30 出处:网络
what the below code line does in java. private static final String PERMISSIONS_KEY = BaseActionStepsHandler.class.getName() + \".USER.ROLES\";

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 InvConfirmActi开发者_如何学PythononStepsHandler . 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.??


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消