Checks to see if this EventSet extends an EventSet declared on a parent control interface.  If
found it will return the parent EventSet, or return null if not found.
168181
public AptEventSet initSuperEventSet()
    {
        // This will be common, so short circuit quickly
        AptControlInterface superControl = _controlIntf.getSuperClass();
        if (superControl == null)
            return null;

        // Compute a hash set containing the qualified names of all super interfaces
        // for this EventSet
        HashSet<String> extendNames = new HashSet<String>();
        for (InterfaceType superType: _eventSet.getSuperinterfaces())
        {
            InterfaceDeclaration superDecl = superType.getDeclaration();
            if (superDecl != null)
                extendNames.add(superDecl.getQualifiedName());
        }

        // Starting with the parent of the ControlInterface declaring this EventSet, look
        // for a parent interface that declares ones of these super interfaces as an event
        // set
        while (superControl != null)
        {
            Collection<AptEventSet> superEventSets = superControl.getEventSets();
            for (AptEventSet superEventSet : superEventSets)
            {
                if (extendNames.contains(superEventSet.getClassName()))
                    return superEventSet;
            }

            superControl = superControl.getSuperClass();
        }

        // Nothing found, so no super event set
        return null;
    }
882121
public AptEventSet getEventSet(String name)
    {
        for (AptEventSet eventSet: getEventSets())
            if (eventSet.getClassName().equals(name))
                return eventSet;

        if (_superClass != null)
            return _superClass.getEventSet(name);

        return null;
    }
212415
public T get() {
        EventImpl event = (EventImpl) CurrentEvent.get();
        if (null == event) {
            return null;
        }
        return event.get(this);
    }
865537
@Check(CheckType.FAST)
	public void checkSuperType(SarlEvent event) {
		checkSuperTypes(
				event,
				SARL_EVENT__EXTENDS,
				Utils.singletonList(event.getExtends()),
				Event.class,
				false);
	}
971160
public void checkParentLinks() {
        this.visit(new NodeVisitor() {
            @Override
            public boolean visit(AstNode node) {
                int type = node.getType();
                if (type == Token.SCRIPT)
                    return true;
                if (node.getParent() == null)
                    throw new IllegalStateException
                            ("No parent for node: " + node
                             + "\n" + node.toSource(0));
                return true;
            }
        });
    }
884636
public boolean hasEvents(final EventType _eventtype)
    {
        if (!this.eventChecked) {
            this.eventChecked = true;
            try {
                EventDefinition.addEvents(this);
            } catch (final EFapsException e) {
                AbstractAdminObject.LOG.error("Could not read events for Name:; {}', UUID: {}",  this.name, this.uuid);
            }
        }
        return this.events.get(_eventtype) != null;
    }
1219060
function (evt, callback) {
    var self = this;

    var extendedEvent = evt;

    this.extendEventHandle(evt, function (err, extEvt) {
      if (err) {
        debug(err);
      }

      extendedEvent = extEvt || extendedEvent;

      var eventExtender = self.tree.getEventExtender(self.eventDispatcher.getTargetInformation(evt));

      if (!eventExtender) {
        return callback(err, extendedEvent);
      }

      eventExtender.extend(extendedEvent, function (err, extEvt) {
        if (err) {
          debug(err);
        }
        extendedEvent = extEvt || extendedEvent;
        callback(err, extendedEvent);
      });

    });
  }
1118957
public Method getEventMethod(Class controlInterface)
    {
        //
        // If we already hold a method reference and its loader matches up with the input
        // interface, then just return it.
        //
        if (_method != null &&
            _method.getDeclaringClass().getClassLoader().equals(controlInterface.getClassLoader()))
            return _method;

        //
        // Otherwise, obtain the mapping from descriptors to methods, and use it to
        // convert back to a method.
        //
        String eventDescriptor = getEventDescriptor(controlInterface); 
        HashMap<String,Method> descriptorMap = getDescriptorMap(controlInterface);
        if (!descriptorMap.containsKey(eventDescriptor))
        {
            throw new IllegalArgumentException("Control interface " + controlInterface + 
                                               " does not contain an event method that " +
                                               " corresponds to " + eventDescriptor);
        }
        return descriptorMap.get(eventDescriptor);
    }
641422
function(control) {
      return this._events.some(function (evt) {
         if (evt.eventType === "StartChildWorkflowExecutionInitiated") {
            if (evt.startChildWorkflowExecutionInitiatedEventAttributes.control === control) {
               return true;
            }
         }
      });
   }
393198
public String getEventSetBinding()
    {
        // Get the type bindings for the associated event field.
        HashMap<String,TypeMirror> typeBinding = _eventField.getTypeBindingMap();

        StringBuffer sb = new StringBuffer();
        boolean isFirst = true;
        for (TypeParameterDeclaration tpd : 
             _eventSet.getDeclaration().getFormalTypeParameters())
        {
            if (isFirst)
            {
                sb.append("<");
                isFirst = false;
            }
            else
                sb.append(", ");

            // Map from the declared formal type name to the bound type name
            // If no map entry exists (i.e. not bindings were specified on the field
            // declaration, then the implied binding is to Object.class
            String typeName = tpd.getSimpleName();
            if (typeBinding.containsKey(typeName))
                sb.append(typeBinding.get(tpd.getSimpleName()));
            else
                sb.append("java.lang.Object");
        }
        if (!isFirst)
            sb.append(">");

        return sb.toString();
    }
223918
@SuppressWarnings("PMD.SwitchStmtsShouldHaveDefault")
  public boolean isCompatible(@NonNull EventType eventType) {
    switch (eventType) {
      case CREATED:
        return (listener instanceof CacheEntryCreatedListener<?, ?>);
      case UPDATED:
        return (listener instanceof CacheEntryUpdatedListener<?, ?>);
      case REMOVED:
        return (listener instanceof CacheEntryRemovedListener<?, ?>);
      case EXPIRED:
        return (listener instanceof CacheEntryExpiredListener<?, ?>);
    }
    throw new IllegalStateException("Unknown event type: " + eventType);
  }
362805
public boolean containsPropertySet(Class<? extends Annotation> propertySet)
    {
        //
        // Defer to any delegate map
        //
        if (_delegateMap != null)
            return _delegateMap.containsPropertySet(propertySet);

        return false;
    }
616322
private boolean checkElement(final StartElement mEvent) throws TTIOException {
        assert mEvent != null;
        boolean retVal = false;

        // Matching element names?
        if (mWtx.getNode().getKind() == IConstants.ELEMENT
            && mWtx.getQNameOfCurrentNode().equals(mEvent.getName())) {
            // Check if atts and namespaces are the same.
            final long nodeKey = mWtx.getNode().getDataKey();

            // Check attributes.
            boolean foundAtts = false;
            boolean hasAtts = false;
            for (final Iterator<?> it = mEvent.getAttributes(); it.hasNext();) {
                hasAtts = true;
                final Attribute attribute = (Attribute)it.next();
                for (int i = 0, attCount = ((ElementNode)mWtx.getNode()).getAttributeCount(); i < attCount; i++) {
                    mWtx.moveToAttribute(i);
                    if (attribute.getName().equals(mWtx.getQNameOfCurrentNode())
                        && attribute.getValue().equals(mWtx.getValueOfCurrentNode())) {
                        foundAtts = true;
                        mWtx.moveTo(nodeKey);
                        break;
                    }
                    mWtx.moveTo(nodeKey);
                }

                if (!foundAtts) {
                    break;
                }
            }
            if (!hasAtts && ((ElementNode)mWtx.getNode()).getAttributeCount() == 0) {
                foundAtts = true;
            }

            // Check namespaces.
            boolean foundNamesps = false;
            boolean hasNamesps = false;
            for (final Iterator<?> namespIt = mEvent.getNamespaces(); namespIt.hasNext();) {
                hasNamesps = true;
                final Namespace namespace = (Namespace)namespIt.next();
                for (int i = 0, namespCount = ((ElementNode)mWtx.getNode()).getNamespaceCount(); i < namespCount; i++) {
                    mWtx.moveToNamespace(i);
                    final ITreeNameData namenode = (ITreeNameData)mWtx.getNode();
                    if (namespace.getNamespaceURI().equals(mWtx.nameForKey(namenode.getURIKey()))
                        && namespace.getPrefix().equals(mWtx.nameForKey(namenode.getNameKey()))) {
                        foundNamesps = true;
                        mWtx.moveTo(nodeKey);
                        break;
                    }
                    mWtx.moveTo(nodeKey);
                }

                if (!foundNamesps) {
                    break;
                }
            }
            if (!hasNamesps && ((ElementNode)mWtx.getNode()).getNamespaceCount() == 0) {
                foundNamesps = true;
            }

            // Check if atts and namespaces are the same.
            if (foundAtts && foundNamesps) {
                retVal = true;
            } else {
                retVal = false;
            }
        }

        return retVal;
    }
152353
static boolean hasMoreApplicationEvents(List<TraceEvent> events, int index)
   {
      if (index < 0 || index >= events.size())
         return false;

      for (int j = index; j < events.size(); j++)
      {
         TraceEvent te = events.get(j);
         if (te.getType() == TraceEvent.GET_CONNECTION ||
             te.getType() == TraceEvent.RETURN_CONNECTION)
            return true;
      }

      return false;
   }
1304700
protected boolean isEndTagEvent(XMLEvent event, QName tagName) {
        return event.isEndElement()
                && event.asEndElement().getName().equals(tagName);
    }
1199840
static boolean isControlStructureCodeBlock(Node parent, Node n) {
    switch (parent.getToken()) {
      case DO:
        return parent.getFirstChild() == n;
      case TRY:
        return parent.getFirstChild() == n || parent.getLastChild() == n;
      case FOR:
      case FOR_IN:
      case FOR_OF:
      case FOR_AWAIT_OF:
      case WHILE:
      case LABEL:
      case WITH:
      case CATCH:
        return parent.getLastChild() == n;
      case IF:
      case SWITCH:
      case CASE:
        return parent.getFirstChild() != n;
      case DEFAULT_CASE:
        return true;
      default:
        checkState(isControlStructure(parent), parent);
        return false;
    }
  }
321038
protected <T> void setEventNotifier(Class<T> eventSet, T notifier)
    {
        _notifiers.put(eventSet,notifier);

        //
        // Register this notifier for all EventSet interfaces up the interface inheritance
        // hiearachy as well
        //
        List<Class> superEventSets = new ArrayList<Class>();
        getSuperEventSets(eventSet, superEventSets);
        Iterator<Class> i = superEventSets.iterator();
        while (i.hasNext())
        {
            Class superEventSet = i.next();
            _notifiers.put(superEventSet,notifier);
        }
    }