basically I need to get a constant for a class however I have no instance of the object but only its class. In PHP I would do constant(XYZ); Is there a similar way
constant(XYZ);
Maybe I don't understand what you need, but did you try with final static attributes and static methods?
Final means that it can't be changed once set, so you get a constant. Static means it's accessible even if there aren't any objects of the class.