Prints the list of static variable and/or enum constant accessor methods.
19483
protected void printStaticAccessors() {
    if (!options.staticAccessorMethods()) {
      return;
    }
    for (VariableDeclarationFragment fragment : getStaticFields()) {
      if (!((FieldDeclaration) fragment.getParent()).hasPrivateDeclaration()) {
        VariableElement varElement = fragment.getVariableElement();
        TypeMirror type = varElement.asType();
        boolean isVolatile = ElementUtil.isVolatile(varElement);
        boolean isPrimitive = type.getKind().isPrimitive();
        String accessorName = nameTable.getStaticAccessorName(varElement);
        String varName = nameTable.getVariableQualifiedName(varElement);
        String objcType = nameTable.getObjCType(type);
        String typeSuffix = isPrimitive ? NameTable.capitalize(TypeUtil.getName(type)) : "Id";
        TypeElement declaringClass = ElementUtil.getDeclaringClass(varElement);
        String baseName = nameTable.getVariableBaseName(varElement);
        ExecutableElement getter =
            ElementUtil.findGetterMethod(baseName, type, declaringClass, /* isStatic = */ true);
        if (getter == null) {
          if (isVolatile) {
            printf(
                "\n+ (%s)%s {\n  return JreLoadVolatile%s(&%s);\n}\n",
                objcType, accessorName, typeSuffix, varName);
          } else {
            printf("\n+ (%s)%s {\n  return %s;\n}\n", objcType, accessorName, varName);
          }
        }
        ExecutableElement setter =
            ElementUtil.findSetterMethod(baseName, type, declaringClass, /* isStatic = */ true);
        if (setter == null && !ElementUtil.isFinal(varElement)) {
          String setterFunc = isVolatile
              ? (isPrimitive ? "JreAssignVolatile" + typeSuffix : "JreVolatileStrongAssign")
              : (isPrimitive | options.useARC() ? null : "JreStrongAssign");
          if (setterFunc == null) {
            printf("\n+ (void)set%s:(%s)value {\n  %s = value;\n}\n",
                NameTable.capitalize(accessorName), objcType, varName);
          } else {
            printf("\n+ (void)set%s:(%s)value {\n  %s(&%s, value);\n}\n",
                NameTable.capitalize(accessorName), objcType, setterFunc, varName);
          }
        }
      }
    }
    if (typeNode instanceof EnumDeclaration) {
      for (EnumConstantDeclaration constant : ((EnumDeclaration) typeNode).getEnumConstants()) {
        VariableElement varElement = constant.getVariableElement();
        printf("\n+ (%s *)%s {\n  return %s;\n}\n",
            typeName, nameTable.getStaticAccessorName(varElement),
            nameTable.getVariableQualifiedName(varElement));
      }
    }
  }
922950
def PrintRanges(type, name, ranges):
  """"""
  print "static const %s %s[] = {" % (type, name,)
  for lo, hi in ranges:
    print "\t{ %d, %d }," % (lo, hi)
  print "};"
124672
@Override
  public String printConfig() {
    StringBuilder text = new StringBuilder();
    text.append("=== CONFIGURATION ===\n");
    text.append("type: " + variableTypes.size() + " x variable\n");
    text.append(printConfigVariableTypes(variableTypes));
    text.append("type: " + groupTypes.size() + " x group\n");
    text.append(printConfigMappingTypes(groupTypes));
    text.append("type: " + groupAnnotationTypes.size() + " x groupAnnotation");
    text.append(printConfigMappingTypes(groupAnnotationTypes));
    text.append("type: " + wordTypes.size() + " x word\n");
    text.append(printConfigMappingTypes(wordTypes));
    text.append("type: " + wordAnnotationTypes.size() + " x wordAnnotation");
    text.append(printConfigMappingTypes(wordAnnotationTypes));
    text.append("type: " + relationTypes.size() + " x relation\n");
    text.append(printConfigMappingTypes(relationTypes));
    text.append(
        "type: " + relationAnnotationTypes.size() + " x relationAnnotation\n");
    text.append(printConfigMappingTypes(relationAnnotationTypes));
    text.append("type: " + refTypes.size() + " x references\n");
    text.append(printConfigMappingTypes(refTypes));
    text.append("=== CONFIGURATION ===\n");
    return text.toString();
  }
295278
static function listMethods( )
    {
        $methods = array();
        $ini = eZINI::Instance( 'ezjscore.ini' );
        foreach( $ini->groups() as $blockname => $data )
        {
            if ( strpos( $blockname, 'ezjscServer_' ) === 0 )
            {
                $classname = substr( $blockname, 12 );

                // replicate same logic as ezjscore
                if ( $ini->hasVariable( $blockname, 'TemplateFunction' ) )
                {
                    // unluckily any function name is accepted here
                    $methods[] = "$classname::*";
                }
                else
                {
                    // load file if defined, else use autoload (same as ezjsc does)
                    if ( $ini->hasVariable( $blockname, 'File' ) )
                        include_once( $ini->variable( $blockname, 'File' ) );
                    // get class name if defined, else use first argument as class name
                    if ( $ini->hasVariable( $blockname, 'Class' ) )
                        $realclassname = $ini->variable( $blockname, 'Class' );
                    else
                        $realclassname = $classname;

                    if ( class_exists( $realclassname ) )
                    {
                        $reflectionClass = new ReflectionClass( $realclassname );
                        foreach( $reflectionClass->getMethods() as $reflectionMethod )
                        {
                            if ( $reflectionMethod->isStatic() )
                            {
                                $methods[] = "$classname::" . $reflectionMethod->name;
                            }
                        }
                    }
                    else
                    {
                        /// @todo log config error
                    }
                }
            }
        }
        return $methods;
    }
215433
public static String print(DeprData dd) {
        StringBuilder sb = new StringBuilder();
        sb.append(depr(dd.since, dd.forRemoval))
          .append(' ');

        switch (dd.kind) {
            case ANNOTATION_TYPE:
                sb.append("@interface ");
                sb.append(unslashify(dd.typeName));
                break;
            case CLASS:
                sb.append("class ");
                sb.append(unslashify(dd.typeName));
                break;
            case ENUM:
                sb.append("enum ");
                sb.append(unslashify(dd.typeName));
                break;
            case INTERFACE:
                sb.append("interface ");
                sb.append(unslashify(dd.typeName));
                break;

            case ENUM_CONSTANT:
            case FIELD:
                sb.append(unslashify(dd.typeName))
                  .append('.')
                  .append(dd.nameSig);
                break;
            case CONSTRUCTOR:
                Matcher cons = DESC_PAT.matcher(dd.nameSig);
                sb.append(unslashify(dd.typeName));
                if (cons.matches()) {
                    sb.append('(')
                      .append(parms(cons.group("args")))
                      .append(')');
                } else {
                    sb.append('.')
                      .append(dd.nameSig);
                }
                break;
            case METHOD:
                Matcher meth = DESC_PAT.matcher(dd.nameSig);
                if (meth.matches()) {
                    sb.append(desc(meth.group("return")))
                      .append(' ')
                      .append(unslashify(dd.typeName))
                      .append('.')
                      .append(meth.group("name"))
                      .append('(')
                      .append(parms(meth.group("args")))
                      .append(')');
                } else {
                    sb.append(unslashify(dd.typeName))
                      .append('.')
                      .append(dd.nameSig);
                }
                break;
        }

        return sb.toString();
    }
574869
@Override
	public void list(final PrintStream out) {
		lock.readLock().lock();
		try {
			properties.list(out);
		} finally {
			lock.readLock().unlock();
		}
	}
567788
def print_build_info(self):
        """"""
        if self.static_extension:
            build_type = "static extension"
        else:
            build_type = "dynamic extension"
        print("Build type: %s" % build_type)
        print("Include path: %s" % " ".join(self.include_dirs))
        print("Library path: %s" % " ".join(self.library_dirs))
        print("Linked dynamic libraries: %s" % " ".join(self.libraries))
        print("Linked static libraries: %s" % " ".join(self.extra_objects))
        print("Extra compiler options: %s" % " ".join(self.extra_compile_args))
        print("Extra linker options: %s" % " ".join(self.extra_link_args))
270476
public void printHelp() {
        final HelpFormatter formatter = new HelpFormatter();
        final Options options = new Options();
        addStandardOptions(options);
        if (line != null && line.hasOption(ARGUMENT.ADVANCED_HELP)) {
            addAdvancedOptions(options);
        }
        final String helpMsg = String.format("%n%s"
                + " can be used to identify if there are any known CVE vulnerabilities in libraries utilized by an application. "
                + "%s will automatically update required data from the Internet, such as the CVE and CPE data files from nvd.nist.gov.%n%n",
                settings.getString("application.name", "DependencyCheck"),
                settings.getString("application.name", "DependencyCheck"));

        formatter.printHelp(settings.getString("application.name", "DependencyCheck"),
                helpMsg,
                options,
                "",
                true);
    }
725348
public static Print print(final Instance... _instances)
    {
        return print(Arrays.stream(_instances)
                        .map(instance -> instance.getOid())
                        .toArray(String[]::new));
    }
223653
void checkMethods(ClassFile cf) throws ConstantPoolException {
        for (Method m : cf.methods) {
            String mname = m.getName(cf.constant_pool);
            String desc = cf.constant_pool.getUTF8Value(m.descriptor.index);
            MethodSig sig = MethodSig.fromDesc(desc);
            DeprData dd;

            for (String parm : sig.getParameters()) {
                parm = nameFromDescType(parm);
                if (parm != null) {
                    dd = db.getTypeDeprecated(parm);
                    if (dd != null) {
                        printHasMethodParmType(cf, mname, parm, dd.isForRemoval());
                    }
                }
            }

            String ret = nameFromDescType(sig.getReturnType());
            if (ret != null) {
                dd = db.getTypeDeprecated(ret);
                if (dd != null) {
                    printHasMethodRetType(cf, mname, ret, dd.isForRemoval());
                }
            }

            // check overrides
            String overridden = resolveMember(cf, cf.getName(), mname, desc, true, false);
            if (overridden != null) {
                dd = db.getMethodDeprecated(overridden, mname, desc);
                if (dd != null) {
                    printHasOverriddenMethod(cf, overridden, mname, desc, dd.isForRemoval());
                }
            }
        }
    }
1359366
protected String printList()
  {
    String output = "[";
    
    SimpleEntry pointer = first;
    int counter = 0;
    while((pointer != null) && (counter < 3))
    {
      output += "@"+Integer.toHexString(pointer.hashCode());
      pointer = pointer.next;
      if(pointer != null)
        output +=  ", ";
      counter++;
    }
    if(pointer != null)
    {
      output += "..., @"+Integer.toHexString(last.hashCode()) + "]";
    }
    else
      output += "]";
    
    return output;
  }
1316198
private void printNamespaces(NodeTypeData nodeTypeData, OutputStreamWriter out) throws RepositoryException,
      IOException
   {

      /**
       * Using set to store all prefixes found in node types to avoid
       * duplication
       */
      Set<String> namespaces = new HashSet<String>();
      /** Scanning nodeType definition for used namespaces */
      printNameNamespace(nodeTypeData.getName(), namespaces);
      printNameNamespace(nodeTypeData.getPrimaryItemName(), namespaces);
      if (nodeTypeData.getDeclaredSupertypeNames() != null)
      {
         for (InternalQName reqType : nodeTypeData.getDeclaredSupertypeNames())
         {
            printNameNamespace(reqType, namespaces);
         }
      }
      /** Scanning property definitions for used namespaces */
      if (nodeTypeData.getDeclaredPropertyDefinitions() != null)
      {
         for (PropertyDefinitionData property : nodeTypeData.getDeclaredPropertyDefinitions())
         {
            printNameNamespace(property.getName(), namespaces);
         }
      }
      /** Scanning child definitions for used namespaces */
      if (nodeTypeData.getDeclaredChildNodeDefinitions() != null)
      {
         for (NodeDefinitionData child : nodeTypeData.getDeclaredChildNodeDefinitions())
         {
            printNameNamespace(child.getName(), namespaces);
            printNameNamespace(child.getDefaultPrimaryType(), namespaces);
            if (child.getRequiredPrimaryTypes() != null)
            {
               for (InternalQName reqType : child.getRequiredPrimaryTypes())
               {
                  printNameNamespace(reqType, namespaces);
               }
            }
         }
      }
      for (String prefix : namespaces)
      {
         String uri = namespaceRegistry.getURI(prefix);
         out.write("<" + prefix + "='" + uri + "'>\r\n");
      }
   }
186821
def print(self):
        """"""
        cond_var = None
        if self.supported:
            cond_var = conditional_var('{}{}'.format(self.func, self.fn_num))
            print_conditional_if(cond_var)
            print('  AF',  end='')
        else:
            print('  //', end='')
        fn_num = self.fn_num
        if fn_num is None:
            fn_num = 0
        print('({:2d}, {:8s}, {:2d}, {:10s}, {:8s}), // {:s}'.format(self.idx,
              self.func, fn_num, self.pin_type, self.ptr(), self.af_str))
        print_conditional_endif(cond_var)
496912
private void printDeliverables() {
        final List<Map.Entry<String, String>> pairs = readProjectFile().deliverables.stream()
                .filter(deliverable -> deliverable.id != null)
                .map(deliverable -> new AbstractMap.SimpleEntry<String, String>(deliverable.id, deliverable.name))
                .collect(Collectors.toList());
        final int length = pairs.stream()
                .map(p -> p.getKey())
                .map(String::length)
                .reduce(Integer::max)
                .orElse(0);
        for (Map.Entry<String, String> pair : pairs) {
            System.out.println(Strings.padEnd(pair.getKey(), length, ' ')
                    + (pair.getValue() != null ? ("  " + pair.getValue()) : ""));
        }
    }
1142229
private function staticVariableList() {
    $node = new StaticVariableStatementNode();
    $this->matchDocComment($node);
    $this->mustMatch(T_STATIC, $node);
    $variables = new CommaListNode();
    do {
      $variables->addChild($this->staticVariable());
    } while ($this->tryMatch(',', $variables));
    $node->addChild($variables, 'variables');
    $this->endStatement($node);
    return $node;
  }
1280829
private static <T> List<Method> getMethods(Class<T> type, String... names) {

		Assert.notNull(type, "Missing class to search for methods!");
		Assert.notNullOrEmpty(names, "Missing method names to search for!");

		Map<String, Method> candidates = new HashMap<>();
		for (Method method : type.getMethods()) {

			if (Modifier.isStatic(method.getModifiers()) &&
			    method.getReturnType().equals(type) &&
			    method.getParameterTypes().length == 1 &&
			    method.getParameterTypes()[0].isAssignableFrom(String.class)) {

				candidates.put(method.getName(), method);
			}
		}

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

		// go in order desired
		for (String name : names) {
			if (candidates.containsKey(name)) {
				output.add(candidates.get(name));
			}
		}

		return output;
	}
752760
private void printParameterizedType(ParameterizedType parameterizedType)
    throws IOException
  {
    Type rawType = parameterizedType.getRawType();

    if (rawType instanceof Class<?>)
      printClass((Class<?>) rawType);
    else
      printType(rawType);

    print("<");

    Type[] typeParameters = parameterizedType.getActualTypeArguments();

    for (int i = 0; i < typeParameters.length; i++) {
      if (i != 0) {
        print(", ");
      }

      printType(typeParameters[i]);
    }

    print(">");
  }