artofillusion
Class PluginRegistry.PluginResource

java.lang.Object
  extended by artofillusion.PluginRegistry.PluginResource
Enclosing class:
PluginRegistry

public static class PluginRegistry.PluginResource
extends java.lang.Object

A PluginResource represents a resource that was loaded from a plugin. Each PluginResource is identified by a type and an id. Typically the type indicates the purpose for which a resource is to be used, and the id designates a specific resource of that type.

It is also possible for several different localized versions of a resource to be available, possibly provided by different plugins. A single PluginResource object represents all the different localized resources that share the same type and id. When you invoke one of the methods to access the resource's contents, the localized version that most closely matches the currently selected locale is used.


Method Summary
 java.lang.ClassLoader getClassLoader()
          Get the ClassLoader responsible for loading this resource.
 java.lang.String getId()
          Get the id of this PluginResource.
 java.io.InputStream getInputStream()
          Get an InputStream for reading this resource.
 java.lang.String getName()
          Get the fully qualified name of the resource this represents.
 java.lang.String getType()
          Get the type of this PluginResource.
 java.net.URL getURL()
          Get a URL for reading this resource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public java.lang.String getType()
Get the type of this PluginResource.


getId

public java.lang.String getId()
Get the id of this PluginResource.


getInputStream

public java.io.InputStream getInputStream()
Get an InputStream for reading this resource. If there are multiple localized versions, the version which best matches the currently selected locale is used.


getURL

public java.net.URL getURL()
Get a URL for reading this resource. If there are multiple localized versions, the version which best matches the currently selected locale is used.


getName

public java.lang.String getName()
Get the fully qualified name of the resource this represents. If there are multiple localized versions, the version which best matches the currently selected locale is used.


getClassLoader

public java.lang.ClassLoader getClassLoader()
Get the ClassLoader responsible for loading this resource. If there are multiple localized versions, the version which best matches the currently selected locale is used.



Copyright © 1999-2011 by Peter Eastman.