Compile-time equivalent of {@code com.google.io.protocol.ProtocolSupport#isProto2MessageClass}.
336950
public static boolean isProto2MessageClass(VisitorState state, Type type) {
    checkNotNull(type);
    return isAssignableTo(type, MESSAGE_TYPE, state)
        && !isAssignableTo(type, PROTOCOL_MESSAGE_TYPE, state);
  }
925038
function isPrototype(value) {
        var Ctor = value && value.constructor,
            proto =
                (typeof Ctor == "function" && Ctor.prototype) || objectProto;

        return value === proto;
    }
709927
static boolean isInstanceOfType(Object instance, Class<?> clazz) {
    if (clazz.isInterface()) {
      throw new UnsupportedOperationException(
          "Under GWT, we can't determine whether an object is an instance of an interface Class");
    }

    for (Class<?> current = instance.getClass();
        current != null;
        current = current.getSuperclass()) {
      if (current.equals(clazz)) {
        return true;
      }
    }
    return false;
  }
318338
public static boolean isClass(LightweightTypeReference typeRef) {
		final JvmType t = typeRef.getType();
		if (t instanceof JvmGenericType) {
			return !((JvmGenericType) t).isInterface();
		}
		return false;
	}
677760
public byte getGuaranteedProtocolVersion() {
    Byte value = (Byte)jmo.getField(ControlAccess.PROTOCOLVERSION);
    return (value == null) ? 0 : value.byteValue();
  }
1309394
private static String[] getMessageTypesFromMpClass(final Class<?> mpClass) {
        final String[] classAnn = getAllMessageTypeTypeAnnotationValues(mpClass, false);

        // Find all of the handle methods and introspect their parameters.
        final String[] methAnn = AnnotatedMethodInvoker.introspectAnnotationMultiple(mpClass, MessageHandler.class).stream()
                .map(m -> getAllMessageTypeTypeAnnotationValues(m.getParameterTypes()[0], false)).map(Arrays::stream).flatMap(v -> v)
                .toArray(String[]::new);

        return Arrays.stream(new String[][] { classAnn, methAnn }).map(Arrays::stream).flatMap(v -> v).toArray(String[]::new);
    }
907828
private NetProtocol checkProtocol(String protocol)
    {
        //  First check out whether the protcol is something we are aware of.
        NetProtocol proto = NetProtocol.getProtocol(protocol);
        if (proto == null || !proto.valid) {
            errno.set(ZError.EPROTONOSUPPORT);
            return proto;
        }

        //  Check whether socket type and transport protocol match.
        //  Specifically, multicast protocols can't be combined with
        //  bi-directional messaging patterns (socket types).
        if (!proto.compatible(options.type)) {
            errno.set(ZError.ENOCOMPATPROTO);
            return null;
        }
        //  Protocol is available.
        return proto;
    }
515267
private void checkInnerClass(ClassDeclaration jclass)
            throws FatalCompileTimeException
    {
        boolean noFormBeanAnnotation = true;
        if (CompilerUtils.getAnnotation(jclass, FORM_BEAN_TAG_NAME, true) != null) {
            noFormBeanAnnotation = false;
        }
        else {
            //
            // check the methods for validatable property annotations that
            // would be processed elsewhere.
            //
            MethodDeclaration[] methods = CompilerUtils.getClassMethods(jclass, null);
            for (int i = 0; i < methods.length && noFormBeanAnnotation; i++) {
                MethodDeclaration method = methods[i];
                if (CompilerUtils.getAnnotation(method, VALIDATABLE_PROPERTY_TAG_NAME) != null) {
                    noFormBeanAnnotation = false;
                }
            }
        }

        if (noFormBeanAnnotation) {
            _formBeanChecker.check(jclass);
        }
    }
812980
protected boolean checkSupportedMessageTypes(Message msg) {
        if (msg instanceof TextMessage) {
            return true;
        } else {
            try {
                log.error("Unsupported message type: " + msg.getJMSType());
            } catch (JMSException ignore) {
            }
            sendToInvalidMessageQueue(msg);
            return false;
        }
    }
172599
public static <T> Class<T> isAssignableFrom(final Class<?> superType, final Class<T> type, final String message) {
        return INSTANCE.isAssignableFrom(superType, type, message);
    }
1093986
protected boolean isDeprecated(Class<?> clazz, 
        String methodName, Class<?>... paramTypes) {
        
        // check if type is annotated
        if (isDeprecated(clazz)) { return true; }
        
        // check if method is annotated
        try {
            Method method = 
                clazz.getDeclaredMethod(methodName, paramTypes);
            
            if (method.getAnnotation(Deprecated.class) != null) {
                return true;
            }
        }
        catch (NoSuchMethodException nsme) {
            // ignore and continue
        }
        
        // check superclass
        Class<?> superClass = clazz.getSuperclass();
        if (superClass != null) {
            return isDeprecated(superClass, methodName, paramTypes);
        }
        
        // check interfaces
        for (Class<?> iface : clazz.getInterfaces()) {
            return isDeprecated(iface, methodName, paramTypes);
        }
        
        // none found
        return false;
    }
1282919
public static <M extends Message> IterableOfProtosSubject<?, M, Iterable<M>> assertThat(
      @NullableDecl Iterable<M> messages) {
    return assertAbout(protos()).that(messages);
  }
650846
private boolean isLoggerWithClassParm(XMethod m) {
        String signature = m.getSignature();
        return SIG_CLASS_TO_SLF4J_LOGGER.equals(signature) || SIG_CLASS_TO_LOG4J_LOGGER.equals(signature) || SIG_CLASS_TO_LOG4J2_LOGGER.equals(signature)
                || SIG_CLASS_TO_COMMONS_LOGGER.equals(signature);
        // otherwise check the calling class?
    }
758878
private boolean isSupportedPrimitive(PrimitiveTypeInfo type) {
        switch (type.getPrimitiveCategory()) {
            case VOID:
            case STRING:
            case BOOLEAN:
            case BYTE:
            case SHORT:
            case INT:
            case LONG:
            case FLOAT:
            case DOUBLE:
            case DATE:
            case TIMESTAMP:
                return true;
            default:
                return false;
        }
    }
49592
protected boolean isGetClassOnTypeLiteral() {
		JvmIdentifiableElement feature = getFeature();
		if (isGetClass(feature)) {
			XExpression receiver = getSyntacticReceiver();
			if (receiver instanceof XAbstractFeatureCall) {
				IFeatureLinkingCandidate linkingCandidate = getState().getResolvedTypes().getLinkingCandidate((XAbstractFeatureCall) receiver);
				if (linkingCandidate != null && linkingCandidate.isTypeLiteral()) {
					return true;
				}
			}
		}
		return false;
	}
1172149
public static String processProtobufType(Class<?> cls) {
        FieldType fieldType = TYPE_MAPPING.get(cls);
        if (fieldType != null) {
            return fieldType.getType();
        }

        return cls.getSimpleName();
    }
1087695
public boolean isFilterMatch(BaseMessageHeader messageHeader)
    {
        boolean bMatch = super.isFilterMatch(messageHeader);
        if (bMatch)
        {
            if (m_bPrivate)
                bMatch = false; // Only a matching SessionMessageHeader will be sent.
            if ((messageHeader != null)
                && (this.getObjectKey() != null)
                && (messageHeader instanceof SessionMessageHeader)
                && (((SessionMessageHeader)messageHeader).getObjectKey() != null)
                && (!this.getObjectKey().equals(((SessionMessageHeader)messageHeader).getObjectKey())))
                    bMatch = false;   // No match!
            else
                    bMatch = true;    // Match!
        }
        return bMatch;    // MATCH!!!
    }