コード例 #1
0
 /**
  * Register the <code>resource</code> type of <code>type</code> into <code>resourcesRegistry
  * </code> with CSSPrimitiveValue <code>value</code> key.
  *
  * @param resourcesRegistry
  * @param type
  * @param value
  * @param resource
  */
 public static void registerResource(
     IResourcesRegistry resourcesRegistry, Object type, CSSPrimitiveValue value, Object resource) {
   if (resourcesRegistry != null) {
     String key = getCSSPrimitiveValueKey(value);
     if (key != null) resourcesRegistry.registerResource(type, key, resource);
   }
 }
コード例 #2
0
 /**
  * Register the <code>resource</code> type of <code>type</code> into <code>resourcesRegistry
  * </code> with <code>key</code>.
  *
  * @param resourcesRegistry
  * @param type
  * @param key
  * @param resource
  */
 public static void registerResource(
     IResourcesRegistry resourcesRegistry, Object type, String key, Object resource) {
   if (key == null) return;
   if (resourcesRegistry != null) {
     resourcesRegistry.registerResource(type, key, resource);
   }
 }
コード例 #3
0
 /**
  * Return the resource type of <code>type</code> cached into <code>resourcesRegistry</code> with
  * key <code>key</code>.
  *
  * @param resourcesRegistry
  * @param type
  * @param key
  * @return
  */
 public static Object getResource(IResourcesRegistry resourcesRegistry, Object type, String key) {
   if (key == null) return null;
   if (resourcesRegistry != null) return resourcesRegistry.getResource(type, key);
   return null;
 }