Generates an ivy xml with all jars marked as intransitive using the all conflict manager.
978341
def generate_fetch_ivy(cls, jars, ivyxml, confs, resolve_hash_name):
    """"""
    org = IvyUtils.INTERNAL_ORG_NAME
    name = resolve_hash_name

    extra_configurations = [conf for conf in confs if conf and conf != 'default']

    # Use org name _and_ rev so that we can have dependencies with different versions. This will
    # allow for batching fetching if we want to do that.
    jars_by_key = OrderedDict()
    for jar in jars:
      jars_by_key.setdefault((jar.org, jar.name, jar.rev), []).append(jar)


    dependencies = [cls._generate_fetch_jar_template(_jars) for _jars in jars_by_key.values()]

    template_data = TemplateData(org=org,
                                 module=name,
                                 extra_configurations=extra_configurations,
                                 dependencies=dependencies)

    template_relpath = os.path.join('templates', 'ivy_utils', 'ivy_fetch.xml.mustache')
    cls._write_ivy_xml_file(ivyxml, template_data, template_relpath)
639974
void generateMbeanXml(Definition def, String outputDir)
   {
      String mbeanName = def.getDefaultValue().toLowerCase(Locale.US);
      if (def.getRaPackage() != null && !def.getRaPackage().equals(""))
      {
         if (def.getRaPackage().indexOf('.') >= 0)
         {
            mbeanName = def.getRaPackage().substring(def.getRaPackage().lastIndexOf('.') + 1);
         }
         else
            mbeanName = def.getRaPackage();
      }

      try
      {
         outputDir = outputDir + File.separatorChar + "src" + File.separatorChar +
               "main" + File.separatorChar + "resources" + File.separatorChar + "jca";
         FileWriter mbfw = Utils.createFile(mbeanName + ".xml", outputDir);
         MbeanXmlGen mbGen = new MbeanXmlGen();
         mbGen.generate(def, mbfw);
         mbfw.close();
      }
      catch (IOException ioe)
      {
         ioe.printStackTrace();
      }
   }
600136
public String getXmlEditorInitCalls() throws JspException {

        StringBuffer result = new StringBuffer(512);
        try {
            // iterate over unique widgets from collector
            Iterator<I_CmsWidget> i = getWidgetCollector().getUniqueWidgets().iterator();
            while (i.hasNext()) {
                I_CmsWidget widget = i.next();
                result.append(widget.getDialogInitCall(getCms(), this));
            }
        } catch (Exception e) {
            showErrorPage(e);
        }
        return result.toString();
    }
1069230
private void setXMLBeanInterface(String homeInterfaceName, String interfaceName) // F743-32443
    throws InjectionException
    {
        // If a home or business interface was specified in XML, then set that as
        // the injection type.  Both may be null if the XML just provides an
        // override of an annotation to add <ejb-link>... in which case the
        // injection class type will be set when the annotation is processed.

        // For performance, there is no need to load these classes until first
        // accessed, which might be never if there is a binding file, so just the
        // name will be set here. getInjectionClassType() is then overridden to load
        // the class when needed. Prior to EJB 3.0 these interfaces were completely
        // ignored, so this behavior allows EJB 2.1 apps to continue to function
        // even if they had garbage in their deployment descriptor.        d739281
        if (homeInterfaceName != null && homeInterfaceName.length() != 0) // d668376
        {
            ivHomeInterface = true;
            setInjectionClassTypeName(homeInterfaceName);

            if (isValidationLoggable())
            {
                loadClass(homeInterfaceName, isValidationFailable());
                loadClass(interfaceName, isValidationFailable());
            }
        }
        else if (interfaceName != null && interfaceName.length() != 0) // d668376
        {
            ivBeanInterface = true;
            setInjectionClassTypeName(interfaceName);

            if (isValidationLoggable())
            {
                loadClass(interfaceName, isValidationFailable());
            }
        }
    }
442288
@Override
    public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
        StringBuilder buf = new StringBuilder();

        synchronized (payloads) {
            if (payloads.size() > 0) {
                buf.append('<').append(getElementName());
                buf.append(" xmlns=\"").append(getNamespace()).append("\" >");

                Iterator<JinglePayloadType> pt = payloads.listIterator();
                while (pt.hasNext()) {
                    JinglePayloadType pte = pt.next();
                    buf.append(pte.toXML());
                }
                buf.append("</").append(getElementName()).append('>');
            }
        }

        return buf.toString();
    }
416059
protected void generateOtherFiles(RootDoc root, ClassTree classtree) throws Exception {
        BuilderFactory builderFactory = configuration.getBuilderFactory();
        AbstractBuilder constantsSummaryBuilder = builderFactory.getConstantsSummaryBuider();
        constantsSummaryBuilder.build();
        AbstractBuilder serializedFormBuilder = builderFactory.getSerializedFormBuilder();
        serializedFormBuilder.build();
    }
133041
private static JaxInfo[] buildFields(Class<?> clazz, String defaultNS) throws SecurityException, NoSuchFieldException, ClassNotFoundException {
		ArrayList<JaxInfo> fields = null; // allow for lazy instantiation, because many structures won't have XmlType
		Class<?> cls = clazz;
		// Build up Method names from JAXB Annotations
		XmlType xt;
		while((xt = cls.getAnnotation(XmlType.class))!=null) {
			if(fields==null)fields = new ArrayList<JaxInfo>();
			for(String field : xt.propOrder()) {
				if("".equals(field)) break; // odd bug.  "" returned when no fields exist, rather than empty array
				Field rf = cls.getDeclaredField(field);
				Class<?> ft = rf.getType();
				
				boolean required = false;
				boolean nillable = false;
				String xmlName = field;
				String namespace = defaultNS;
				
				XmlElement xe = rf.getAnnotation(XmlElement.class);
				if(xe!=null) {
					xmlName=xe.name();
					required = xe.required();
					nillable = false;
					if(DEFAULT.equals(xmlName)) {
						xmlName = field;
					}
					namespace = xe.namespace();
					if(DEFAULT.equals(namespace)) {
						namespace = defaultNS;
					}
				}
				// If object is a List, then it is possible multiple, per XML/JAXB evaluation
				if(ft.isAssignableFrom(List.class)) {
					Type t = rf.getGenericType();
					String classname = t.toString();
					int start = classname.indexOf('<');
					int end = classname.indexOf('>');
					Class<?> genClass = Class.forName(classname.substring(start+1, end));
					xe = genClass.getAnnotation(XmlElement.class);
					if(xe!=null && !DEFAULT.equals(xe.namespace())) {
						namespace = xe.namespace();
					}
					// add recursed recursed member, marked as array
					fields.add(new JaxInfo(xmlName,namespace,genClass,buildFields(genClass,namespace), genClass.equals(String.class),true,required,nillable));
				} else {
					boolean isString = ft.equals(String.class) || ft.equals(XMLGregorianCalendar.class);
					// add recursed member
					fields.add(new JaxInfo(xmlName,namespace,ft,buildFields(ft,namespace),isString,false,required,nillable));
				}
			}
			cls = cls.getSuperclass();
		};
		if(fields!=null) {
			JaxInfo[] rv = new JaxInfo[fields.size()];
			fields.toArray(rv);
			return rv;
		} else {
			return null;
		}
	}
1223158
@Override
    public void processXML() throws InjectionException {

        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "processXML : " + this);

        List<? extends ConnectionFactory> connectionFactoryDefinitions = ivNameSpaceConfig.getJNDIEnvironmentRefs(ConnectionFactory.class);

        if (connectionFactoryDefinitions != null)
        {
            for (ConnectionFactory connectionFactory : connectionFactoryDefinitions)
            {
                String jndiName = connectionFactory.getName();
                InjectionBinding<ConnectionFactoryDefinition> injectionBinding = ivAllAnnotationsCollection.get(jndiName);
                ConnectionFactoryDefinitionInjectionBinding binding;

                if (injectionBinding != null)
                {
                    binding = (ConnectionFactoryDefinitionInjectionBinding) injectionBinding;
                }
                else
                {
                    binding = new ConnectionFactoryDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
                    addInjectionBinding(binding);
                }

                binding.mergeXML(connectionFactory);
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "processXML : " + this);

    }
1370005
void generateIronjacamarXml(Definition def, String outputDir)
   {
      try
      {
         String resourceDir = outputDir + File.separatorChar + "src" + File.separatorChar +
               "main" + File.separatorChar + "resources";
         writeIronjacamarXml(def, resourceDir);

         if (def.getBuild().equals("maven"))
         {
            String rarDir = outputDir + File.separatorChar + "src" + File.separatorChar +
                  "main" + File.separatorChar + "rar";
            writeIronjacamarXml(def, rarDir);
         }
      }
      catch (IOException ioe)
      {
         ioe.printStackTrace();
      }
   }
1074736
public static ELResolver makeResolverForJSP()
    {
        Map<String, ImplicitObject> forJSPList = new HashMap<String, ImplicitObject>(8);//4
        ImplicitObject io1 = new FacesContextImplicitObject();
        forJSPList.put(io1.getName(), io1);
        ImplicitObject io2 = new ViewImplicitObject();
        forJSPList.put(io2.getName(), io2);
        ImplicitObject io3 = new ResourceImplicitObject();
        forJSPList.put(io3.getName(), io3);
        ImplicitObject io4 = new ViewScopeImplicitObject();
        forJSPList.put(io4.getName(), io4);
        return new ImplicitObjectResolver(forJSPList);
    }
117789
function( elem, context, xml ) {
			var data, cache, outerCache,
				dirkey = dirruns + " " + doneName;

			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
			if ( xml ) {
				while ( (elem = elem[ dir ]) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( (elem = elem[ dir ]) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ expando ] || (elem[ expando ] = {});
						if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
							if ( (data = cache[1]) === true || data === cachedruns ) {
								return data === true;
							}
						} else {
							cache = outerCache[ dir ] = [ dirkey ];
							cache[1] = matcher( elem, context, xml ) || cachedruns;
							if ( cache[1] === true ) {
								return true;
							}
						}
					}
				}
			}
		}
1281652
public static void generate(ConfigurationImpl configuration,
                                ClassTree classtree)  {
        ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree);
        ClassDoc[] classes = configuration.root.classes();
        for (int i = 0; i < classes.length; i++) {
            // If -nodeprecated option is set and the containing package is marked
            // as deprecated, do not generate the class-use page. We will still generate
            // the class-use page if the class is marked as deprecated but the containing
            // package is not since it could still be linked from that package-use page.
            if (!(configuration.nodeprecated &&
                    Util.isDeprecated(classes[i].containingPackage())))
                ClassUseWriter.generate(configuration, mapper, classes[i]);
        }
        PackageDoc[] pkgs = configuration.packages;
        for (int i = 0; i < pkgs.length; i++) {
            // If -nodeprecated option is set and the package is marked
            // as deprecated, do not generate the package-use page.
            if (!(configuration.nodeprecated && Util.isDeprecated(pkgs[i])))
                PackageUseWriter.generate(configuration, mapper, pkgs[i]);
        }
    }
330030
def execute(self):
    
    if JvmResolveSubsystem.global_instance().get_options().resolver != 'ivy':
      return

    compile_classpath = self.context.products.get_data('compile_classpath',
        init_func=ClasspathProducts.init_func(self.get_options().pants_workdir))

    targets = self.context.targets()
    if all(not isinstance(target, JarLibrary) for target in targets):
      if self._report:
        self.context.log.info("Not generating a report. No resolution performed.")
      return

    executor = self.create_java_executor()
    results = self.resolve(executor=executor,
                                      targets=targets,
                                      classpath_products=compile_classpath,
                                      confs=self.get_options().confs,
                                      extra_args=self._args)
    if self._report:
      results_with_resolved_artifacts = [r for r in results if r.has_resolved_artifacts]

      if not results_with_resolved_artifacts:
        self.context.log.info("Not generating a report. No resolution performed.")
      else:
        for result in results_with_resolved_artifacts:
          self._generate_ivy_report(result)
684933
def generate(env):
    """"""
    SCons.Tool.CreateJarBuilder(env)

    SCons.Tool.CreateJavaFileBuilder(env)
    SCons.Tool.CreateJavaClassFileBuilder(env)
    SCons.Tool.CreateJavaClassDirBuilder(env)

    env.AddMethod(Jar)

    env['JAR']        = 'jar'
    env['JARFLAGS']   = SCons.Util.CLVar('cf')
    env['_JARFLAGS']  = jarFlags
    env['_JARMANIFEST'] = jarManifest
    env['_JARSOURCES'] = jarSources
    env['_JARCOM']    = '$JAR $_JARFLAGS $TARGET $_JARMANIFEST $_JARSOURCES'
    env['JARCOM']     = "${TEMPFILE('$_JARCOM','$JARCOMSTR')}"
    env['JARSUFFIX']  = '.jar'
121853
protected Map<String, ConfigElementList> generateConflictMap(List<? extends ConfigElement> list) {
        return generateConflictMap(null, list);
    }
1306183
private void generateXMLReport( final ITransaction transaction, final WebdavResponse resp, final LockedObject lo )
        throws IOException
    {

        final HashMap<String, String> namespaces = new HashMap<String, String>();
        namespaces.put( "DAV:", "D" );

        resp.setStatus( SC_OK );
        resp.setContentType( "text/xml; charset=UTF-8" );

        final XMLWriter generatedXML = new XMLWriter( resp.getWriter(), namespaces );
        generatedXML.writeXMLHeader();
        generatedXML.writeElement( "DAV::prop", XMLWriter.OPENING );
        generatedXML.writeElement( "DAV::lockdiscovery", XMLWriter.OPENING );
        generatedXML.writeElement( "DAV::activelock", XMLWriter.OPENING );

        generatedXML.writeElement( "DAV::locktype", XMLWriter.OPENING );
        generatedXML.writeProperty( "DAV::" + _type );
        generatedXML.writeElement( "DAV::locktype", XMLWriter.CLOSING );

        generatedXML.writeElement( "DAV::lockscope", XMLWriter.OPENING );
        if ( _exclusive )
        {
            generatedXML.writeProperty( "DAV::exclusive" );
        }
        else
        {
            generatedXML.writeProperty( "DAV::shared" );
        }
        generatedXML.writeElement( "DAV::lockscope", XMLWriter.CLOSING );

        final int depth = lo.getLockDepth();

        generatedXML.writeElement( "DAV::depth", XMLWriter.OPENING );
        if ( depth == INFINITY )
        {
            generatedXML.writeText( "Infinity" );
        }
        else
        {
            generatedXML.writeText( String.valueOf( depth ) );
        }
        generatedXML.writeElement( "DAV::depth", XMLWriter.CLOSING );

        generatedXML.writeElement( "DAV::owner", XMLWriter.OPENING );
        generatedXML.writeElement( "DAV::href", XMLWriter.OPENING );
        generatedXML.writeText( _lockOwner );
        generatedXML.writeElement( "DAV::href", XMLWriter.CLOSING );
        generatedXML.writeElement( "DAV::owner", XMLWriter.CLOSING );

        final long timeout = lo.getTimeoutMillis();
        generatedXML.writeElement( "DAV::timeout", XMLWriter.OPENING );
        generatedXML.writeText( "Second-" + timeout / 1000 );
        generatedXML.writeElement( "DAV::timeout", XMLWriter.CLOSING );

        final String lockToken = lo.getID();
        generatedXML.writeElement( "DAV::locktoken", XMLWriter.OPENING );
        generatedXML.writeElement( "DAV::href", XMLWriter.OPENING );
        generatedXML.writeText( "opaquelocktoken:" + lockToken );
        generatedXML.writeElement( "DAV::href", XMLWriter.CLOSING );
        generatedXML.writeElement( "DAV::locktoken", XMLWriter.CLOSING );

        generatedXML.writeElement( "DAV::activelock", XMLWriter.CLOSING );
        generatedXML.writeElement( "DAV::lockdiscovery", XMLWriter.CLOSING );
        generatedXML.writeElement( "DAV::prop", XMLWriter.CLOSING );

        resp.addHeader( "Lock-Token", "<opaquelocktoken:" + lockToken + ">" );

        generatedXML.sendData();

    }
325316
private static <L> Map<Name, TypeSet<ResourceType<L>>> buildTypeMapForConstructor(
            Collection<ResourceType<L>> allTypes) {
        TypeSetBuilder<ResourceType<L>> bldr = TypeSet.<ResourceType<L>> builder();
        bldr.enabled(true);
        bldr.name(new Name("all"));
        for (ResourceType<L> type : allTypes) {
            bldr.type(type);
        }
        TypeSet<ResourceType<L>> typeSet = bldr.build();

        return Collections.singletonMap(typeSet.getName(), typeSet);
    }