Reputation: 8573
Given a domain that starts
class MyDomain {
/* pre injuries board */
Boolean isSomething = false
Is there a way I can get the default value without instantiating an object?
Upvotes: 1
Views: 1071
Reputation: 26801
No, not without doing something like this:
class MyDomain {
public static final Boolean IS_SOMETHING_DEFAULT = false
Boolean isSomething = IS_SOMETHING_DEFAULT
...
}
Later...
Boolean myDomainDefault = MyDomain.IS_SOMETHING_DEFAULT
Upvotes: 3