Reputation: 9032
I'm trying to convert following java snippet to Xtend, but i couldn't able to do it. I'm not able to access static property 'class'.
public class SyncService{
private static final String LOGT = SyncService.class.getSimpleName();
}
I tried following methods,
class SyncService {
val LOGT = SyncService.class.getSimpleName();
}
class SyncService {
val LOGT = SyncService::class.getSimpleName();
}
Upvotes: 3
Views: 744
Reputation: 6729
According to the documentation it's
SyncService.simpleName
or with the legacy syntax:
typeof(SyncService).simpleName
Upvotes: 3