Checks that the inline type annotations are correct.
199086
private void checkInlineParams(NodeTraversal t, Node function) {
    Node paramList = NodeUtil.getFunctionParameters(function);

    for (Node param : paramList.children()) {
      JSDocInfo jsDoc = param.getJSDocInfo();
      if (jsDoc == null) {
        t.report(param, MISSING_PARAMETER_JSDOC);
        return;
      } else {
        JSTypeExpression paramType = jsDoc.getType();
        checkNotNull(paramType, "Inline JSDoc info should always have a type");
        checkParam(t, param, null, paramType);
      }
    }
  }
521194
private function isParseExtendAnnotations(array $annotations, int $type = 1): bool
    {
        foreach ($this->extends as $extend) {
            if ($type == 1) {
                $isParse = $extend->isParseClassAnnotations($annotations);
            } elseif ($type == 2) {
                $isParse = $extend->isParsePropertyAnnotations($annotations);
            } else {
                $isParse = $extend->isParseMethodAnnotations($annotations);
            }
            if ($isParse) {
                return true;
            }
        }

        return false;
    }
523829
public void check()
    {
        //
        // Find the nearest @ControlInterface, which is where the relevant control checker
        // annotation will be found.
        //

        AptControlInterface mostDerived = (AptControlInterface) getMostDerivedInterface();
        if ( mostDerived == null )
            return;

        InterfaceDeclaration intfDecl = mostDerived._intfDecl;

        if ( intfDecl == null )
            return;

        AnnotationMirror controlMirror = null;

        for (AnnotationMirror annot : intfDecl.getAnnotationMirrors())
        {
            if (annot.getAnnotationType().getDeclaration().getQualifiedName().equals(
                    "org.apache.beehive.controls.api.bean.ControlInterface"))
            {
                controlMirror = annot;
                break;
            }
        }

        assert ( controlMirror != null ) : "Found a control interface that isn't annotated properly: " + intfDecl;

        AptAnnotationHelper controlAnnot = new AptAnnotationHelper(controlMirror);

        //
        // Read the name of the checker class from the @ControlInterface annotation,
        // dynamically load and run it.
        //

        DeclaredType checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checker");
        if ( checkerMirror == null )
        {
            // try the deprecated 'checkerClass' attribute
            checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checkerClass");
        }

        if ( checkerMirror != null && checkerMirror.getDeclaration() != null )
        {
            // TODO: optimize to not invoke default checker?
            String checkerName = checkerMirror.toString();

            try
            {
                ClassLoader loader = getExternalClassLoader();

                Class checkerClass = loader.loadClass( checkerName );
                if ( !ControlChecker.class.isAssignableFrom(checkerClass) )
                {
                    _ap.printError( intfDecl, "control.interface.illegal.checker", intfDecl.getSimpleName(), checkerName );
                }
                else
                {

                    Constructor ctor = checkerClass.getConstructor();

                    ControlChecker checker = (ControlChecker) ctor.newInstance();
                    CheckerAnnotationProcessorEnvironmentImpl ape =
                            new CheckerAnnotationProcessorEnvironmentImpl(_ap);
                    checker.check( _intfDecl, ape );
                }
            }
            catch ( Exception e ) {
                _ap.printError( intfDecl, "control.interface.checker.load.failed", intfDecl.getSimpleName(), checkerName );
            }
        }
    }
495131
def _is_inline(button):
        
        return isinstance(button, (
            types.KeyboardButtonCallback,
            types.KeyboardButtonSwitchInline,
            types.KeyboardButtonUrl
        ))
942859
private boolean checkValidClass(Class<?> clazz) {
        return clazz.isAnnotationPresent(Entity.class) || clazz.isAnnotationPresent(MappedSuperclass.class)
            || clazz.isAnnotationPresent(Embeddable.class);

    }
979061
protected void initValid(EnhancedAnnotation<T> annotatedAnnotation) {
        this.valid = false;
        for (Class<? extends Annotation> annotationType : getMetaAnnotationTypes()) {
            if (annotatedAnnotation.isAnnotationPresent(annotationType)) {
                this.valid = true;
            }
        }
    }
945197
void expectValidTypeofName(Node n, String found) {
    report(JSError.make(n, UNKNOWN_TYPEOF_VALUE, found));
  }
127888
private static void checkSensibility(AnnotatedType<?> type) {
        // check if it has a constructor
        if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) {
            MetadataLogger.LOG.noConstructor(type);
        }

        Set<Class<?>> hierarchy = new HashSet<Class<?>>();
        for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) {
            hierarchy.add(clazz);
            hierarchy.addAll(Reflections.getInterfaceClosure(clazz));
        }
        checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type);
        checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type);
        checkMembersBelongToHierarchy(type.getFields(), hierarchy, type);
    }
459654
public static boolean isRawType(final Type type) {
        if (type instanceof Class) {
            final Class<?> clazz = (Class<?>) type;
            return (clazz.getTypeParameters().length > 0);
        }
        if (type instanceof ParameterizedType) {
            final ParameterizedType ptype = (ParameterizedType) type;
            return (ptype.getActualTypeArguments().length == 0);
        }
        return false;
    }
629499
public void typeCheck(AFromModuleImports ifm, ModuleEnvironment env)
			throws AnalysisException
	{
		TypeCheckVisitor tc = new TypeCheckVisitor();
		TypeCheckInfo question = new TypeCheckInfo(af, env, null, null);

		for (List<PImport> ofType : ifm.getSignatures())
		{
			for (PImport imp : ofType)
			{
				imp.apply(tc, question);
			}
		}

	}
989062
function isPropTypesDeclaration(context, node) {
  // Special case for class properties
  // (babel-eslint does not expose property name so we have to rely on tokens)
  if (node.type === 'ClassProperty') {
    const tokens = context.getFirstTokens(node, 2);
    if (isTypesDecl(tokens[0].value) || isTypesDecl(tokens[1].value)) {
      return true;
    }
    return false;
  }

  return Boolean(node && isTypesDecl(node.name));
}
1021952
function(args, types) {
		this._validating = true;
		var is = this._match(args, types);
		this._validating = false;
		return is;
	}
1311049
private static boolean compareAnnotated(Annotated a1, Annotated a2) {
        return a1.getAnnotations().equals(a2.getAnnotations());
    }
209974
void expectValidAsyncReturnType(Node n, JSType type) {
    if (promiseOfUnknownType.isSubtypeOf(type)) {
      return;
    }

    JSError err = JSError.make(n, INVALID_ASYNC_RETURN_TYPE, type.toString());
    registerMismatch(type, promiseOfUnknownType, err);
    report(err);
  }
490621
private void ensureTyped(Node n, JSType type) {
    // Make sure FUNCTION nodes always get function type.
    checkState(!n.isFunction() || type.isFunctionType() || type.isUnknownType());
    if (n.getJSType() == null) {
      n.setJSType(type);
    }
  }
772777
function(types) {
			if (textUtil.compare(this._textAnnotationTypesVisible, types)) return;
			this._textAnnotationTypesVisible = types;
			if (!this._annotationStyler || !this._textView) { return; }
			this._annotationStyler.setAnnotationTypeVisible(types);
			this._textView.redrawLines(0, undefined);
		}
189620
public void check()
        throws FatalCompileTimeException
    {
        HashSet declsToCheck = new HashSet();

        //
        // First, build up the Set of declarations to check.  We don't want any duplicates.
        //
        for ( int i = 0; i < _atds.length; ++i )
        {
            AnnotationTypeDeclaration atd = _atds[i];
            Declaration[] decls = getAnnotationProcessorEnvironment().getDeclarationsAnnotatedWith( atd );
            for ( int j = 0; j < decls.length; j++ )
            {
                declsToCheck.add( decls[j] );
            }
        }

        // Now, check the declarations.
        check(declsToCheck);
    }