Find the names of any classes referenced in the type descriptors of annotation parameters.

@param referencedClassNames
the referenced class names
329665
@Override
    void findReferencedClassNames(final Set<String> referencedClassNames) {
        referencedClassNames.add(name);
        if (annotationParamValues != null) {
            for (final AnnotationParameterValue annotationParamValue : annotationParamValues) {
                annotationParamValue.findReferencedClassNames(referencedClassNames);
            }
        }
    }
147846
@Override
    void findReferencedClassNames(final Set<String> classNameListOut) {
        if (classBound != null) {
            classBound.findReferencedClassNames(classNameListOut);
        }
        for (final ReferenceTypeSignature typeSignature : interfaceBounds) {
            typeSignature.findReferencedClassNames(classNameListOut);
        }
    }
1125680
private void findReferenced(ClassDocImpl containingClass) {
        if (where.length() > 0) {
            if (containingClass != null) {
                referencedClass = containingClass.findClass(where);
            } else {
                referencedClass = docenv().lookupClass(where);
            }
            if (referencedClass == null && holder() instanceof ProgramElementDoc) {
                referencedClass = docenv().lookupClass(
                    ((ProgramElementDoc) holder()).containingPackage().name() + "." + where);
            }

            if (referencedClass == null) { /* may just not be in this run */
                // check if it's a package name
                referencedPackage = docenv().lookupPackage(where);
                return;
            }
        } else {
            if (containingClass == null) {
                docenv().warning(holder,
                                 "tag.see.class_not_specified",
                                 name, text);
                return;
            } else {
                referencedClass = containingClass;
            }
        }
        where = referencedClass.qualifiedName();

        if (what == null) {
            return;
        } else {
            int paren = what.indexOf('(');
            String memName = (paren >= 0 ? what.substring(0, paren) : what);
            String[] paramarr;
            if (paren > 0) {
                // has parameter list -- should be method or constructor
                paramarr = new ParameterParseMachine(what.
                        substring(paren, what.length())).parseParameters();
                if (paramarr != null) {
                    referencedMember = findExecutableMember(memName, paramarr,
                                                            referencedClass);
                } else {
                    referencedMember = null;
                }
            } else {
                // no parameter list -- should be field
                referencedMember = findExecutableMember(memName, null,
                                                        referencedClass);
                FieldDoc fd = ((ClassDocImpl)referencedClass).
                                                            findField(memName);
                // when no args given, prefer fields over methods
                if (referencedMember == null ||
                    (fd != null &&
                     fd.containingClass()
                         .subclassOf(referencedMember.containingClass()))) {
                    referencedMember = fd;
                }
            }
            if (referencedMember == null) {
                docenv().warning(holder,
                                 "tag.see.can_not_find_member",
                                 name, what, where);
            }
        }
    }
1054498
public Set<Class<?>> findReferencedTypes(String typeName) {
        Set<Class<?>> referencedTypes = new HashSet<>();

        // use the cached version if possible
        if (referencedTypesCache.containsKey(typeName)) {
            return referencedTypesCache.get(typeName);
        }

        try {
            CtClass cc = classPool.get(typeName);
            for (Object referencedType : cc.getRefClasses()) {
                String referencedTypeName = (String)referencedType;

                if (!isExcluded(referencedTypeName)) {
                    try {
                        referencedTypes.add(loadClass(referencedTypeName));
                    } catch (Throwable t) {
                        log.debug("Could not find " + referencedTypeName + " ... ignoring.");
                    }
                }
            }

            // remove the type itself
            referencedTypes.remove(loadClass(typeName));
        } catch (Exception e) {
            log.debug("Error finding referenced types for " + typeName + " ... ignoring.");

            // since there was an error, we can't find the set of referenced types from it, so...
            referencedTypesCache.put(typeName, new HashSet<>());
        }

        // cache for the next time
        referencedTypesCache.put(typeName, referencedTypes);

        return referencedTypes;
    }
215389
@Override
	public String getQualifiedName(char innerClassDelimiter) {
		if (references != null && !references.isEmpty()) {
			StringBuilder result = new StringBuilder();
			for(JvmTypeReference reference: references) {
				if (result.length() > 0) {
					result.append(getDelimiter());
				}
				result.append(reference.getQualifiedName(innerClassDelimiter));
			}
			return result.toString();
		}
		return super.getIdentifier();
	}
1358756
@Override
	protected Set<Class<? extends Annotation>> getSupportedAnnotationClasses() {
		Set<Class<? extends Annotation>> annotations = new LinkedHashSet<Class<? extends Annotation>>();

		annotations.add(BindType.class);
		annotations.add(BindDataSource.class);
		annotations.add(BindDataSourceOptions.class);
		annotations.add(BindSqlType.class);
		annotations.add(BindDao.class);
		annotations.add(BindDaoMany2Many.class);
		annotations.add(BindGeneratedDao.class);

		return annotations;
	}
409139
@Override
	public Set<String> getSupportedAnnotationTypes() {		
		Set<String> result=new HashSet<String>();		
		for (Class<? extends Annotation> annotation: getSupportedAnnotationClasses()) {
			result.add(annotation.getCanonicalName());	
		}
				
		return result;
	}
314828
private Set<String> getExcludedAnnotationClassNames(Element element) {
    return getExcludedAnnotationTypes(element)
        .stream()
        .map(MoreTypes::asTypeElement)
        .map(typeElement -> typeElement.getQualifiedName().toString())
        .collect(toSet());
  }
749845
public MethodDescriptor[] 
    getTeaContextMethodDescriptors(Class<?>[] contextClasses) {

        Vector<MethodDescriptor> v = new Vector<MethodDescriptor>();
        Hashtable<Method, Method> methods = new Hashtable<Method, Method>();

        if (contextClasses != null) {

            // Combine all of the MethodDescriptors

            for (int i = 0; i < contextClasses.length; i++) {
                Class<?> c = contextClasses[i];
                if (c == null) {
                    continue;
                }

                MethodDescriptor[] mds = 
                    getTeaContextMethodDescriptors(c, false);
                
                for (int j = 0; j < mds.length; j++) {
                    MethodDescriptor md = mds[j];
                    Method m = md.getMethod();
                    // Check uniqueness of method
                    if (methods.get(m) == null) {
                        methods.put(m, m);
                        v.addElement(md);
                    }
                }
            }
        }

        MethodDescriptor[] methodDescriptors = new MethodDescriptor[v.size()];
        v.copyInto(methodDescriptors);

        // Sort the combined results
        sortMethodDescriptors(methodDescriptors);

        return methodDescriptors;
    }
264008
static Set<Method> findCandidateMethods(Class<?>[] classes, String name) {
		StringBuilder sb = new StringBuilder();
		for (Class<?> clazz : classes) {
			sb.append(clazz.getName()).append("::");
		}
		String cacheKey = sb.append(name).toString();
		if (methodCache.containsKey(cacheKey)) {
			return methodCache.get(cacheKey);
		}
		Set<Method> methods = new HashSet<>();
		for (Class<?> clazz : classes) {
            for (Method method : clazz.getMethods()) {
                if (method.isAnnotationPresent(JsonRpcMethod.class)) {
                    JsonRpcMethod methodAnnotation = method.getAnnotation(JsonRpcMethod.class);

                    if (methodAnnotation.required()) {
                        if (methodAnnotation.value().equals(name)) {
                            methods.add(method);
                        }
                    } else if (methodAnnotation.value().equals(name) || method.getName().equals(name)) {
                        methods.add(method);
                    }
                } else if (method.getName().equals(name)) {
                    methods.add(method);
                }
            }
        }
		methods = Collections.unmodifiableSet(methods);
		methodCache.put(cacheKey, methods);
		return methods;
	}
1080683
void handleRepeatableAnnotations(final Set<String> allRepeatableAnnotationNames) {
        if (annotationInfo != null) {
            annotationInfo.handleRepeatableAnnotations(allRepeatableAnnotationNames, getClassInfo(),
                    RelType.FIELD_ANNOTATIONS, RelType.CLASSES_WITH_FIELD_ANNOTATION);
        }
    }
446810
@Override
    protected void findReferencedClassNames(final Set<String> classNames) {
        final TypeSignature methodSig = getTypeSignature();
        if (methodSig != null) {
            methodSig.findReferencedClassNames(classNames);
        }
        final TypeSignature methodDesc = getTypeDescriptor();
        if (methodDesc != null) {
            methodDesc.findReferencedClassNames(classNames);
        }
        if (annotationInfo != null) {
            for (final AnnotationInfo ai : annotationInfo) {
                ai.findReferencedClassNames(classNames);
            }
        }
    }
1305550
private static ImmutableList<String> getClassNames(String qualifiedName) {
    ImmutableList.Builder<String> classNames = ImmutableList.builder();
    List<String> parts = DOT_SPLITTER.splitToList(qualifiedName);
    for (int i = 0; i < parts.size(); i++) {
      String part = parts.get(i);
      if (isClassOrConstantName(part)) {
        classNames.add(DOT_JOINER.join(parts.subList(0, i + 1)));
      }
    }
    return classNames.build();
  }
1075453
private <T extends Describable<T>>
    Descriptor<T> findDescriptor(String shortClassName, Collection<? extends Descriptor<T>> descriptors) {
        String name = '.'+shortClassName;
        for (Descriptor<T> d : descriptors) {
            if(d.clazz.getName().endsWith(name))
                return d;
        }
        return null;
    }
951239
private Map<String, ClassRef> getReferenceMap() {
        Map<String, ClassRef> mapping = new HashMap<String, ClassRef>();
        List<ClassRef> refs = getReferences();

        //It's best to have predictable order, so that we can generate uniform code.
        Collections.sort(refs, new Comparator<ClassRef>() {
            @Override
            public int compare(ClassRef o1, ClassRef o2) {
                return o1.getFullyQualifiedName().compareTo(o2.getFullyQualifiedName());
            }
        });

        for (ClassRef ref : refs) {
            String key = ref.getDefinition().getName();
            if (!mapping.containsKey(key)) {
                mapping.put(key, ref);
            }
        }
        return mapping;
    }
626298
@Override
	public void setReferences(IReferences references) {

		List<Object> loggers = references.getOptional(new Descriptor(null, "logger", null, null, null));
		for (Object logger : loggers) {
			if (logger instanceof ILogger && logger != this)
				_loggers.add((ILogger) logger);
		}
	}
255680
@Override
    public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException {

        if (!checked) {
            checked = true;
            Collection<TypeQualifierValue<?>> allKnownTypeQualifiers = TypeQualifierValue.getAllKnownTypeQualifiers();
            int size = allKnownTypeQualifiers.size();
            if (size == 1) {
                TypeQualifierValue<?> value = Util.first(allKnownTypeQualifiers);
                if (!value.typeQualifier.getClassName().equals(NONNULL_ANNOTATION)) {
                    shouldRunAnalysis = true;
                }

            } else if (size > 1) {
                shouldRunAnalysis = true;
            }
        }

        if (shouldRunAnalysis) {
            super.visitClass(classDescriptor);
        }
    }