Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.44 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                 public function add(handlerType:Class):InstanceHandlerCollection {
  2.                         var handler:* = instanceClass(handlerType);
  3.                         var foundType:Boolean = false;
  4.  
  5.                         if (handler is BeforeInstanceHandler) {
  6.                                 beforeHandlers.push(handler);
  7.                                 foundType = true;
  8.                         }
  9.  
  10.                         if (handler is AfterInstanceHandler) {
  11.                                 afterHandlers.push(handler);
  12.                                 foundType = true;
  13.                         }
  14.  
  15.                         if (!foundType)
  16.                                 throw new NotAnInstanceHandlerError(handlerType);
  17.  
  18.                         return this;
  19.                 }