Outputs all the static injection methods for the given class.
550562
void outputStaticInjectionMethods(Class<?> type, FragmentMap fragments,
      NameGenerator nameGenerator, SourceWriteUtil sourceWriteUtil) {
    String methodName = nameGenerator.convertToValidMemberName("injectStatic_" + type.getName());
    SourceSnippetBuilder body = new SourceSnippetBuilder();
    for (InjectionPoint injectionPoint : InjectionPoint.forStaticMethodsAndFields(type)) {
      Member member = injectionPoint.getMember();
      try {
        List<InjectorMethod> staticInjectionHelpers = new ArrayList<InjectorMethod>();

        if (member instanceof Method) {
          MethodLiteral<?, Method> method =
              MethodLiteral.get((Method) member, TypeLiteral.get(member.getDeclaringClass()));
          body.append(methodCallUtil.createMethodCallWithInjection(method, null, nameGenerator,
              staticInjectionHelpers));
        } else if (member instanceof Field) {
          FieldLiteral<?> field =
              FieldLiteral.get((Field) member, TypeLiteral.get(member.getDeclaringClass()));
          body.append(sourceWriteUtil.createFieldInjection(field, null, nameGenerator,
              staticInjectionHelpers));
        }

        outputMethods(staticInjectionHelpers, fragments);
      } catch (NoSourceNameException e) {
        errorManager.logError(e.getMessage(), e);
      }
    }

    // Note that the top-level method that performs static injection will only
    // invoke a bunch of other injector methods.  Therefore, it doesn't matter
    // which package it goes in, and we don't need to invoke getUserPackageName
    // (which is good, because in practice users statically inject types that
    // have no user package name because they're private inner classes!)
    String packageName = type.getPackage().getName();
    InjectorMethod method = SourceSnippets.asMethod(false, "private void " + methodName + "()",
        packageName, body.build());
    GinjectorFragmentOutputter fragment =
        fragments.get(fragmentPackageNameFactory.create(packageName));
    fragment.outputMethod(method);
    fragment.invokeInInitializeStaticInjections(methodName);
  }
1174168
public static Method[] getAllMethods(Class<?> clazz) {
        Method[] allMethods = allClassMethodsCache.get(clazz);
        if (allMethods == null) {
            // Allows a race between concurrent threads coming for clazz's methods at the same time,
            // but the race seems to be harmless.
            allMethods = doGetAllMethods(clazz);
            allClassMethodsCache.put(clazz, allMethods);
        }
        return allMethods;
    }
1360235
private static Method[] getAllDeclaredMethods(Class<?> classHierarchy)
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();

        Collection<MethodMap.MethodInfo> methodInfos = MethodMap.getAllDeclaredMethods(classHierarchy);
        Method[] methods = new Method[methodInfos.size()];
        int index = 0;

        for (MethodMap.MethodInfo methodInfo : methodInfos)
        {
            Method method = methodInfo.getMethod();
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(tc, "adding method " + method);
            methods[index++] = method;
        }

        return methods;
    }
1056806
public List<Method> listMethods( final Class<?>    classObj,
                                     final String      methodName )
    {
        //
        //    Get the array of methods for my classname.
        //
        Method[] methods = classObj.getMethods();

        List<Method> methodSignatures = new ArrayList<Method>();

        //
        //    Loop round all the methods and print them out.
        //
        for ( int ii = 0; ii < methods.length; ++ii )
        {
            if ( methods[ii].getName().equals( methodName ) )
            {
                methodSignatures.add( methods[ii] );
            }
        }

        return methodSignatures;
    }
300211
public static Method[] getAllMethods(Class<?> clz) {
    Set<Method> set = new HashSet<>();
    List<Class<?>> classes = new ArrayList<>();
    classes.add(clz);
    classes.addAll(Arrays.asList(getAllSuperClasses(clz)));
    classes.addAll(Arrays.asList(getAllInterfaces(clz)));
    for (Class<?> c : classes) {
      set.addAll(Arrays.asList(c.getDeclaredMethods()));
    }
    return set.toArray(new Method[set.size()]);
  }
944764
private Map<String, List<String>> findImplementations(ClassLoader loader,
                                                          List<Class<?>> interfaceClasses) throws MojoExecutionException {
        Map<String, List<String>> serviceImplementations = new HashMap<String, List<String>>();
        for (String interfaceClassName : getServices()) {
            serviceImplementations.put(interfaceClassName, new ArrayList<String>());
        }
        getLog().info("Scanning generated classes for implementations...");
        File classFolder = getClassFolder();
        List<String> classNames = listCompiledClasses(classFolder);
        // List<String> classNames = listCompiledClassesRegex( classFolder );
        for (String className : classNames) {
            try {
                if(getLog().isDebugEnabled()){
                    getLog().debug("checking class: " + className);
                }
                Class<?> cls = loader.loadClass(className);
                int mods = cls.getModifiers();
                if (!cls.isAnonymousClass() && !cls.isInterface()
                        && !cls.isEnum() && !Modifier.isAbstract(mods)
                        && Modifier.isPublic(mods)) {
                    for (Class<?> interfaceCls : interfaceClasses) {
                        if (!interfaceCls.equals(cls) && interfaceCls.isAssignableFrom(cls)) {
                            
                            // if the includes section isn't empty, we need to respect the choice and only include the items that are shown there.
                            if (includes == null || includes.length == 0) {
                                serviceImplementations.get(interfaceCls.getName()).add(className);
                            } else {
                                for ( String include : includes )
                                {
                                    if(SelectorUtils.match(include, className)) {
                                        serviceImplementations.get(interfaceCls.getName()).add(className);
                                    }
                                }
                            }
                            
                        }
                    }
                }
            } catch (ClassNotFoundException e1) {
                getLog().warn(e1);
            } catch (NoClassDefFoundError e2) {
                getLog().warn(e2);
            }
            
        }
        
        // in the next iteration we start to process with the excludes
        if (excludes != null && excludes.length != 0) {
            Set<Entry<String,List<String>>> entrySet = serviceImplementations.entrySet();
            for ( Entry<String, List<String>> entry : entrySet )
            {
                classNames = entry.getValue();
                ListIterator<String> classNamesIter = classNames.listIterator();
                
                while ( classNamesIter.hasNext())
                {
                    String className = classNamesIter.next();
                    for ( String exclude : excludes )
                    {
                        if(SelectorUtils.match(exclude, className)) {
                          classNamesIter.remove();
                          break;
                        }
                    }
                }
            }
        }
        return serviceImplementations;
    }
131062
@Override
    public void report() {
        // collect sinks and report each once
        Set<InjectionSink> injectionSinksToReport = new HashSet<InjectionSink>();
        for (Set<InjectionSink> injectionSinkSet : injectionSinks.values()) {
            for (InjectionSink injectionSink : injectionSinkSet) {
                injectionSinksToReport.add(injectionSink);
            }
        }
        for (InjectionSink injectionSink : injectionSinksToReport) {
            bugReporter.reportBug(injectionSink.generateBugInstance(false));
        }
    }
204420
private void injectStructMethods(MethodDefinition read, LocalVariableDefinition instance, Map<Short, LocalVariableDefinition> structData)
    {
        for (ThriftMethodInjection methodInjection : metadata.getMethodInjections()) {
            injectMethod(read, methodInjection, instance, structData);
        }
    }
500434
public static List<Method> getAllDeclaredMethods(Class<?> clazz) {
		List<Method> result = new ArrayList<>();
		while (clazz != null) {
			Method[] methods = clazz.getDeclaredMethods();
			Collections.addAll(result, methods);
			clazz = clazz.getSuperclass();
		}
		return result;
	}
368108
static Map<String, Method> getAllGetters(Class<?> clazz) {
        Map<String, Method> methods = new HashMap<String, Method>();
        while (!clazz.equals(Object.class)) {
            for (Method m : clazz.getDeclaredMethods()) {
                if (Modifier.isStatic(m.getModifiers())) {
                    continue;
                }
                String propertyName = getGetterName(m);
                if (shouldIgnore(m)) {
                    methods.put(propertyName, null);
                }
                if (propertyName!=null && !methods.containsKey(propertyName)) {
                    methods.put(propertyName, m);
                }
            }
            clazz = clazz.getSuperclass();
        }
        return methods;
    }
46248
private void injectArguments(final List<Element> arguments, final MethodIdentifier identifier) {
        final boolean staticMethod = identifier.isStaticMethod();
        final int startIndex = staticMethod ? 0 : 1;
        final int endIndex = staticMethod ? arguments.size() - 1 : arguments.size();

        IntStream.rangeClosed(startIndex, endIndex).forEach(i -> localVariables.put(i, arguments.get(staticMethod ? i : i - 1)));
    }
1333740
@Override
    public List<String> getInjectionClasses(Container moduleContainer) {
        final List<String> listOfClassNames = new ArrayList<String>();
        
        for(WebAppInjectionClassListCollaborator collab: webAppInjectionClassListCollaborators.services()){
            listOfClassNames.addAll(collab.getInjectionClasses(moduleContainer));
        }
        
        return listOfClassNames;
    }
807660
public static <T> Method[] getAllMethodExcept(Class<T> type, String... methodNames) {
        List<Method> methodsToMock = new LinkedList<Method>();
        Method[] methods = getAllMethods(type);
        iterateMethods:
        for (Method method : methods) {
            for (String methodName : methodNames) {
                if (method.getName().equals(methodName)) {
                    continue iterateMethods;
                }
            }
            methodsToMock.add(method);
        }
        return methodsToMock.toArray(new Method[0]);
    }
1174667
public static Map<String, Method> getClassWriteMethods(Class<?> clazz) {
		Map<String, Method> writeMethods = classWriteMethods.get(clazz);
		if (writeMethods == null) {
			cacheReadWriteMethodsAndBoxField(clazz);
			return classWriteMethods.get(clazz);
		} else
			return writeMethods;
	}
1210544
@Override
    public <T> List<InjectionPoint> getJEEComponentInjectionPoints(Class<T> clazz) throws CDIException {
        InjectionTarget<T> injectionTarget = getJEEComponentInjectionTarget(clazz);
        List<InjectionPoint> injectionPoints = null;

        if (injectionTarget != null) {
            injectionPoints = new ArrayList<InjectionPoint>();
            Set<InjectionPoint> jeeClassInjectionPoints = injectionTarget.getInjectionPoints();
            if (jeeClassInjectionPoints != null && jeeClassInjectionPoints.size() > 0) {
                injectionPoints.addAll(jeeClassInjectionPoints);
            }

            String mainClassName = archive.getClientModuleMainClass();

            if (mainClassName != null) {
                if (clazz.getName().equals(mainClassName)) {
                    List<InjectionPoint> staticInjectionPoints = this.staticInjectionPoints.get(clazz);
                    if (staticInjectionPoints != null) {
                        injectionPoints.addAll(staticInjectionPoints);
                    }
                }
            }
        }

        return injectionPoints;
    }
899511
static public function dumpInstances()
    {
        foreach (static::$instances as $k => $v) {
            echo $k . ':' . get_class($v) . ':'; print_r($v->getOption()); PHP_EOL;
        }
    }
132837
public static Method[] getAllInstanceMethods(final Class<?> clazz) {
        if (clazz == null) {
            return null;
        }

        List<Method> methods = new ArrayList<Method>();
        for (Method method : clazz.getMethods()) {
            if (!Modifier.isStatic(method.getModifiers())
                    && Modifier.isPublic(method.getModifiers())) {
                methods.add(method);
            }
        }

        return methods.toArray(new Method[methods.size()]);
    }