Declarative UI with XML

From inside there is no convenient way. You never know all classes.
From outside I would suggest Eclipse’s Type Hierarchy.