コード例 #1
0
 // initialize the application wide default content producers
 static {
   fDefaultRegistry.registerContentProducer(URL.class, new URLContentProducer());
 }
コード例 #2
0
 /**
  * Unregisters ie: removes a registered producer for a target class.<br>
  * A check is made to ensure the removed producer is the current producer for the target class. If
  * not, the request is ignored.
  *
  * @param producer the producer to unregister
  * @param targetClass the target class
  */
 public static void unregisterDefaultContentProducer(Class targetClass, ContentProducer producer) {
   fDefaultRegistry.unregisterContentProducer(targetClass, producer);
 }
コード例 #3
0
 /**
  * Gets the exact application global Producer for the target class, ie: no class hierarchy search
  *
  * @param targetClass the target class
  * @return The producer
  */
 public static ContentProducer getExactDefaultContentProducer(Class targetClass) {
   return fDefaultRegistry.getExactContentProducer(targetClass);
 }
コード例 #4
0
 /**
  * Registers an application global producer
  *
  * @param producer the registered producer
  * @param targetClass The class associated with the producer
  * @return the previous producer registered for the target class
  */
 public static ContentProducer registerDefaultContentProducer(
     Class targetClass, ContentProducer producer) {
   return fDefaultRegistry.registerContentProducer(targetClass, producer);
 }