Returns <code>true</code> if the `criterion`
is of the same class or a base class of this event's class.

@see org.jgrapes.core.Eligible#isEligibleFor(java.lang.Object)
488909
@Override
    public boolean isEligibleFor(Object criterion) {
        return Class.class.isInstance(criterion)
            && ((Class<?>) criterion).isAssignableFrom(getClass());
    }
155006
public boolean isForeachCompatible(Class<?> clazz) {
        if (clazz == null) {
            return false;
        }

        return (clazz.isArray() || 
                Collection.class.isAssignableFrom(clazz));         
    }
1189903
public boolean isAssignableFrom(JClass cl)
  {
    if (getName().equals(cl.getName()))
      return true;

    JClass []ifc = cl.getInterfaces();

    for (int i = 0; i < ifc.length; i++) {
      if (isAssignableFrom(ifc[i]))
        return true;
    }

    if (cl.getSuperClass() != null)
      return isAssignableFrom(cl.getSuperClass());
    else
      return false;
  }
978276
public boolean isThrowable() {
        if (isEnum() || isInterface() || isAnnotationType()) {
            return false;
        }
        for (Type t = type; t.hasTag(CLASS); t = env.types.supertype(t)) {
            if (t.tsym == env.syms.throwableType.tsym) {
                return true;
            }
        }
        return false;
    }
301776
public static boolean isBindingAnnotation(Class<? extends Annotation> annotation) {
    return annotation.isAnnotationPresent(BindingAnnotation.class)
        || annotation.isAnnotationPresent(Qualifier.class);
  }
571921
public static boolean isConvertibleToPublisher(Class<?> type) {
        if (Publisher.class.isAssignableFrom(type)) {
            return true;
        } else {
            for (Class<?> reactiveType : REACTIVE_TYPES) {
                if (reactiveType.isAssignableFrom(type)) {
                    return true;
                }
            }
            return false;
        }
    }
1004425
public static boolean isDouble( Class clazz ) {
      return clazz != null
            && (Double.TYPE.isAssignableFrom( clazz ) || Double.class.isAssignableFrom( clazz ));
   }
915786
public static boolean isAssignableTo(String classInternalName, Class<?> type) {
        checkArgNotNull(classInternalName, "classInternalName");
        checkArgNotNull(type, "type");
        return type.isAssignableFrom(getClassForInternalName(classInternalName));
    }
942859
private boolean checkValidClass(Class<?> clazz) {
        return clazz.isAnnotationPresent(Entity.class) || clazz.isAnnotationPresent(MappedSuperclass.class)
            || clazz.isAnnotationPresent(Embeddable.class);

    }
1247374
private static boolean isMatching(Method base, Method compare) {

		// if names and argument types match ... then this are the same method
		if (base.getName().equals(compare.getName()) &&
		    base.getParameterCount() == compare.getParameterCount()) {

			Class<?>[] typeBase = base.getParameterTypes();
			Class<?>[] typeCompare = compare.getParameterTypes();

			for (int index = 0; index < typeBase.length; index++) {
				Class clazzBase = typeBase[index];
				Class clazzCompare = typeCompare[index];
				if (!clazzBase.equals(clazzCompare)) {
					return false;
				}
			}

			return true;
		}

		return false;
	}
1025039
private static boolean isLowerBoundCompatible(final WildcardType type, final Class... with) {
        boolean res = true;
        if (type.getLowerBounds().length > 0) {
            // only one super could be used
            // couldn't be an object here as ? super Object is always replaced to simply Object before comparison
            final Class<?> lower = GenericsUtils.resolveClassIgnoringVariables(type.getLowerBounds()[0]);

            // target may only be lower bound's super type (or same type)
            for (Class<?> target : with) {
                if (!target.isAssignableFrom(lower)) {
                    res = false;
                    break;
                }
            }
        }
        return res;
    }
1091168
public boolean qualifyForComparison(Element control, Element test) {
        return ElementSelectors.byName.canBeCompared(control, test);
    }
85742
@Override
    public boolean isPreferredMech ( ASN1ObjectIdentifier mechanism ) {
        if ( isAnonymous() ) {
            return super.isPreferredMech(mechanism);
        }
        return PREFERRED_MECHS.contains(mechanism);
    }
205480
static boolean isIncludeValue(EventFilter filter) {
        // the order of the following ifs is important!
        // QueryEventFilter is instance of EntryEventFilter
        if (filter instanceof EventListenerFilter) {
            filter = ((EventListenerFilter) filter).getEventFilter();
        }
        if (filter instanceof TrueEventFilter) {
            return true;
        }
        if (filter instanceof QueryEventFilter) {
            return ((QueryEventFilter) filter).isIncludeValue();
        }
        if (filter instanceof EntryEventFilter) {
            return ((EntryEventFilter) filter).isIncludeValue();
        }
        throw new IllegalArgumentException("Unknown EventFilter type = [" + filter.getClass().getCanonicalName() + "]");
    }
858781
private static boolean isUptoEligible(Temporal from, Temporal to) {
        TemporalAmount amount = rightShift(from, to);
        if (amount instanceof Period) {
            return isNonnegative((Period) amount);
        } else if (amount instanceof Duration) {
            return isNonnegative((Duration) amount);
        } else {
            throw new GroovyRuntimeException("Temporal implementations of "
                    + from.getClass().getCanonicalName() + " are not supported by upto().");
        }
    }
924026
public static boolean isPrimitive(Class<?> aClass)
	{
		if(aClass == null)
			return false;
		
		String className = aClass.getName();
		return className.matches("(float|char|short|double|int|long|byte|boolean|(java.lang.(Long|Integer|String|Float|Double|Short|Byte|Boolean)))");
		
	}
477461
public boolean isEquivalent(CodecIdentifier other) {
        if (this.codecName.equals(other.getCodecName())) {
            return true;
        }
        if (this.codecAliases != null && this.codecAliases.contains(other.getCodecName())) {
            return true;
        }
        if (other.getCodecAliases() != null && other.getCodecAliases().contains(this.codecName)) {
            return true;
        }
        return false;
    }