For example, suppose the classpath contains:
com/foo/SomeThing.class com/foo/my-template.cs com/foo/subdir/another-template.cs
You can access the resources in the class's package like this:
ResourceLoader loader = new ClassResourceLoader(SomeThing.class); loader.open("my-template.cs"); loader.open("subdir/my-template.cs");Or by using a relative path:
ResourceLoader loader = new ClassResourceLoader(Something.class, "subdir"); loader.open("my-template.cs");@see ResourceLoader @see ClassLoaderResourceLoader
|
|
|
|