![]() |
![]() |
![]() |
![]() |
![]() |
|
You can get the Class instance for the MovieAuxiliaries class by
way of the class instance variable attached to the MovieAuxiliaries
class:
*-- MovieAuxiliaries class v MovieAuxiliaries.class ---------------------- ^ *-- Instance of Class class, the companion class
Once you retrieve a class's companion Class instance, you
can use the getResource method on that instance, together with a
file name, to produce a location description:
*-- Instance of Class class,
| the companion of the MovieAuxiliaries class
v
----------------------
URL url = MovieAuxiliaries.class.getResource(fileName)
--------------------------------------------
^
*-- A location description