Opening the classes which are defined as receivers.
540865
def open_receiver_class
      # Define association for receiver model
      [receivers_class(@@options[:receivers])].flatten.each do |base|
        base.class_eval do
          has_many :deliveries, class_name: 'SimpleNotifications::Delivery', as: :receiver
          has_many :received_notifications, through: :deliveries, source: :simple_notification
        end
      end
    end
1084608
private void reconstituteTargetStreams(ProducerInputHandler inputHandler)
    throws MessageStoreException,
    SIException,
    SIResourceException   
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "reconstituteTargetStreams");

    /*
     * Iterate through all contained Protocol Items, rebuilding
     * associated target streams for each.
     */ 
    NonLockingCursor cursor = null;
    
    try
    {
      cursor = newNonLockingItemCursor(new ClassEqualsFilter(StreamSet.class));
           
	    AbstractItem item = null;
	    while (null != (item = cursor.next()))
	    {
	      StreamSet streamSet = (StreamSet)item;
	      inputHandler.reconstituteTargetStreams(streamSet);
	    }
    }
    finally
    {
      if (cursor != null)
        cursor.finished();
    }

    if (tc.isEntryEnabled())  
      SibTr.exit(tc, "reconstituteTargetStreams");      
  }
52804
public void registerReceiver (InvocationDecoder decoder)
    {
        // add the receiver to the list
        _reclist.add(decoder);

        // if we're already online, assign a receiver id to this decoder
        if (_clobj != null) {
            assignReceiverId(decoder);
        }
    }
793955
private void onHandlerEntry() {
        if (enabled) {
            Type exceptionType = handlers.get(handlerPendingInstruction);

            // Clear the pending instruction flag
            handlerPendingInstruction = null;

            // Filter the interested down to this exception
            Set<ProbeListener> filtered = new HashSet<ProbeListener>();
            for (ProbeListener listener : enabledListeners) {
                ListenerConfiguration config = listener.getListenerConfiguration();
                ProbeFilter filter = config.getTransformerData(EXCEPTION_FILTER_KEY);
                if (filter.isBasicFilter() && filter.basicClassNameMatches(exceptionType.getClassName())) {
                    filtered.add(listener);
                } else if (filter.isAdvancedFilter()) {
                    Class<?> clazz = getOwningClass(exceptionType.getInternalName());
                    if (clazz != null && filter.matches(clazz)) {
                        filtered.add(listener);
                    }
                }
            }

            if (filtered.isEmpty()) {
                return;
            }

            String key = createKey(exceptionType);
            ProbeImpl probe = getProbe(key);
            long probeId = probe.getIdentifier();

            setProbeInProgress(true);
            visitInsn(DUP); // throwable throwable
            visitLdcInsn(Long.valueOf(probeId)); // throwable throwable long1 long2
            visitInsn(DUP2_X1); // throwable long1 long2 throwable long1 long2
            visitInsn(POP2); // throwable long1 long2 throwable
            if (isStatic()) {
                visitInsn(ACONST_NULL); // throwable long1 long2 throwable this
            } else {
                visitVarInsn(ALOAD, 0); // throwable long1 long2 throwable this
            }
            visitInsn(SWAP); // throwable long1 long2 this throwable
            visitInsn(ACONST_NULL); // throwable long1 long2 this throwable null
            visitInsn(SWAP); // throwable long1 long2 this null throwable
            visitFireProbeInvocation(); // throwable
            setProbeInProgress(false);

            setProbeListeners(probe, filtered);
        }
    }
1337739
def register_classes(self, classes):
        
        classes = util.return_list(classes)
        for klass in classes:
            IPlugin.register(klass)
477962
def call_receivers(self, client, clients_list, message):
        
        # Try to parse JSON
        try:
            json_message = json.loads(message)
        except ValueError:
            json_message = None

        for func, to_json in self.receivers:

            # Check if json version is available
            if to_json:
                if json_message is None:
                    continue
                msg = json_message
            else:
                msg = message

            # Call callback
            func(client, clients_list, msg)
530131
def process_and_show(self):
        
        for name, klass in sorted(self.classes.items()):
            logger.debug('Processing class: %s', name)
            if not isinstance(klass, DvClass):
                klass = DvClass(klass, self.vma)
            klass.process()
            klass.show_source()
730992
@Override
    public boolean redefineClasses(Notification notification) {
        // if there are no paths to process, this is a minor update
        if (notification.getPaths().isEmpty()) {
            return true;
        }

        boolean success;
        synchronized (classLoaders) {
            if (classLoaders.isEmpty()) {
                success = false;
            } else {
                success = true;
                for (ContainerClassLoader loader : classLoaders) {
                    if (!loader.redefineClasses(notification)) {
                        success = false;
                        break;
                    }
                }
            }
        }

        return success;
    }
279523
def __live_receivers(signal):
    
    with __lock:
        __purge()
        receivers = [funcref() for funcref in __receivers[signal]]

    return receivers
1177116
public void initConstructorDeclaredEjbInterceptors() {
        Class<?>[] constructorDeclaredInterceptors = interceptorsApi.extractInterceptorClasses(constructor);
        if (constructorDeclaredInterceptors != null) {
            for (Class<?> clazz : constructorDeclaredInterceptors) {
                builder.interceptGlobal(InterceptionType.AROUND_CONSTRUCT, null, Collections.<InterceptorClassMetadata<?>>singleton(reader.getPlainInterceptorMetadata(clazz)), null);
            }
        }
    }
861427
def connect(self, receiver):
        """"""
        if not callable(receiver):
            raise ValueError('Invalid receiver: %s' % receiver)
        self.receivers.append(receiver)
1285074
public void instrumentWithProbes(Collection<Class<?>> classes) {
        for (Class<?> clazz : classes) {
            try {
                instrumentation.retransformClasses(clazz);
            } catch (Throwable t) {
            }
        }
    }
86113
def function( receiver ):
    
    if hasattr(receiver, '__call__'):
        # Reassign receiver to the actual method that will be called.
        if hasattr( receiver.__call__, im_func) or hasattr( receiver.__call__, im_code):
            receiver = receiver.__call__
    if hasattr( receiver, im_func ):
        # an instance-method...
        return receiver, getattr(getattr(receiver, im_func), func_code), 1
    elif not hasattr( receiver, func_code):
        raise ValueError('unknown reciever type %s %s'%(receiver, type(receiver)))
    return receiver, getattr(receiver,func_code), 0
1179347
protected void processClass (Class<?> sclass)
        throws IOException
    {
        if (!Streamable.class.isAssignableFrom(sclass) ||
            ((sclass.getModifiers() & Modifier.INTERFACE) != 0) ||
            DSet.class.equals(sclass) ||
            (InvocationMarshaller.class.isAssignableFrom(sclass) && !InvocationMarshaller.class.equals(sclass))) {
//            System.err.println("Skipping " + sclass.getName() + "...");
            return;
        }

        System.err.println("Generating " + sclass.getName());

        // see if our parent also implements Streamable
        boolean needSuper = Streamable.class.isAssignableFrom(sclass.getSuperclass()) &&
             !NONSUPER.contains(sclass.getSuperclass());

        Map<String, Object> ctx = Maps.newHashMap();
        ctx.put("superclassStreamable", needSuper);
        ctx.put("name", sclass.getSimpleName());
        ctx.put("namespaces", makeNamespaces(sclass));
        ctx.put("javaName", sclass.getName());
        ctx.put("namespace", CPPUtil.makeNamespace(sclass));

        Set<String> headerIncludes = Sets.newTreeSet();
        Set<String> implIncludes = Sets.newTreeSet();
        if (needSuper) {
            ctx.put("super", makeCPPName(sclass.getSuperclass()));
            addInclude(sclass.getSuperclass(), headerIncludes);
        } else {
            ctx.put("super", "Streamable");
            headerIncludes.add("presents/Streamable.h");
        }

        List<CPPField> fields = Lists.newArrayList();
        ctx.put("fields", fields);
        for (Field field : sclass.getDeclaredFields()) {
            int mods = field.getModifiers();
            if (!Modifier.isStatic(mods) && !Modifier.isTransient(mods)) {
                CPPField cppField = new CPPField(field);
                fields.add(cppField);
                CPPType type = cppField.type;
                while (type != null) {
                    if (CPPType.JAVA_LIST_FIXED.equals(type.fixed)) {
                        implIncludes.add("presents/Streamer.h");
                    }
                    if (type.representationImport != null) {
                        headerIncludes.add(type.representationImport);
                    }
                    type = type.dependent;
                }
            }
        }
        String inStream, outStream;
        if (fields.isEmpty() && !needSuper) {
            inStream = "/*in*/";
            outStream = "/*out*/";
        } else {
            inStream = "in";
            outStream = "out";

        }
        ctx.put("inStreamArg", inStream);
        ctx.put("outStreamArg", outStream);

        // now write all that out to the target source file
        ctx.put("includes", headerIncludes);
        writeTemplate(HEADER_TMPL, makePath(_cpproot, sclass, ".h"), ctx);

        ctx.put("includes", implIncludes);
        writeTemplate(CPP_TMPL, makePath(_cpproot, sclass, ".cpp"), ctx);
    }
31373
private void addVetoedClasses(String serviceName, String serviceImpls, ClassLoader classLoader,
        Map<Class<?>, Set<Class<?>>> vetoed) {
        try {
            final Class<?> serviceClass = classLoader.loadClass(serviceName);
            final Set<Class<?>> classes = loadVetoedServiceImpl(serviceImpls, classLoader);

            final Set<Class<?>> registeredVetoedClasses = vetoed.get(serviceClass);
            if (registeredVetoedClasses == null) {
                vetoed.put(serviceClass, classes);
            } else {
                registeredVetoedClasses.addAll(classes);
            }
        } catch (ClassNotFoundException e) {
            // ignores since this is a veto that it is not applicable
        }
    }
676108
def get_reader_classes(parent=Reader):
    """"""
    children = parent.__subclasses__()
    descendants = children[:]
    for child in children:
        grandchildren = get_reader_classes(child)
        if grandchildren:
            descendants.remove(child)
            descendants.extend(grandchildren)
    return descendants
620008
private void collectReceiver(final Class<?> eventClass, final Collection<ReceiverDescriptor> receiverCollection) {

		if (this.receiverMap.get(eventClass) != null) {
			receiverCollection.addAll(this.receiverMap.get(eventClass));
		}
		if (!eventClass.isInterface() && eventClass.getSuperclass() != Object.class) {
			this.collectReceiver(eventClass.getSuperclass(), receiverCollection);
		}
		for (final Class interfaceClass : eventClass.getInterfaces()) {
			this.collectReceiver(interfaceClass, receiverCollection);
		}
	}