java variable declaration
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.
精彩评论