Produce the LegStar converter support classes.

@param xmlSchemaSource the XML schema source
@param targetPackageName the target Avro package name
@return a map of lass names associated with their code
513176
private Map < String, String > generateConverterClasses(
            String xmlSchemaSource, String targetPackageName) {

        log.debug("Converter support classes generation started");
        Map < String, String > codeMap = xsd2CobolTypes.generate(
                new StringReader(xmlSchemaSource), targetPackageName);
        if (log.isDebugEnabled()) {
            log.debug("Generated converter support classes: ");
            for (String code : codeMap.values()) {
                log.debug(code);
                log.debug("\n");
            }
        }
        log.debug("Converter support classes generation ended");
        return codeMap;
    }
1282955
protected void addPackageResources(Package aPackage, Map<String, ClassResource> urlSet, ClassLoader[] classLoaders) {
        String packageName = aPackage.getName();
        String relativePath = getPackageRelativePath(packageName);
        List<URL> resources = getResources(relativePath, classLoaders);
        for (URL resource : resources) {
            String key = getJavaResourceKey(resource);
            urlSet.put(key, new ClassResource(packageName, resource));
        }
    }
571243
public void addPackageFromDrl(final Reader reader,
                                  final Resource sourceResource) throws DroolsParserException,
            IOException {
        this.resource = sourceResource;
        final DrlParser parser = new DrlParser(configuration.getLanguageLevel());
        final PackageDescr pkg = parser.parse(sourceResource, reader);
        this.results.addAll(parser.getErrors());
        if (pkg == null) {
            addBuilderResult(new ParserError(sourceResource, "Parser returned a null Package", 0, 0));
        }

        if (!parser.hasErrors()) {
            addPackage(pkg);
        }
        this.resource = null;
    }
168646
public XSDocument startSchema(String targetNamespace) throws SAXException{
        xml.startElement(URI_XSD, "schema");
        if(targetNamespace!=null && !targetNamespace.isEmpty()){
            xml.declarePrefix(targetNamespace);
            xml.addAttribute("targetNamespace", targetNamespace);
        }
        return this;
    }
285312
def _legacy_symbol_table(build_file_aliases):
  
  table = {
    alias: _make_target_adaptor(TargetAdaptor, target_type)
    for alias, target_type in build_file_aliases.target_types.items()
  }

  for alias, factory in build_file_aliases.target_macro_factories.items():
    # TargetMacro.Factory with more than one target type is deprecated.
    # For default sources, this means that TargetMacro Factories with more than one target_type
    # will not parse sources through the engine, and will fall back to the legacy python sources
    # parsing.
    # Conveniently, multi-target_type TargetMacro.Factory, and legacy python source parsing, are
    # targeted to be removed in the same version of pants.
    if len(factory.target_types) == 1:
      table[alias] = _make_target_adaptor(
        TargetAdaptor,
        tuple(factory.target_types)[0],
      )

  # TODO: The alias replacement here is to avoid elevating "TargetAdaptors" into the public
  # API until after https://github.com/pantsbuild/pants/issues/3560 has been completed.
  # These should likely move onto Target subclasses as the engine gets deeper into beta
  # territory.
  table['python_library'] = _make_target_adaptor(PythonTargetAdaptor, PythonLibrary)

  table['jvm_app'] = _make_target_adaptor(AppAdaptor, JvmApp)
  table['jvm_binary'] = _make_target_adaptor(JvmBinaryAdaptor, JvmBinary)
  table['python_app'] = _make_target_adaptor(AppAdaptor, PythonApp)
  table['python_tests'] = _make_target_adaptor(PythonTestsAdaptor, PythonTests)
  table['python_binary'] = _make_target_adaptor(PythonBinaryAdaptor, PythonBinary)
  table['remote_sources'] = _make_target_adaptor(RemoteSourcesAdaptor, RemoteSources)
  table['page'] = _make_target_adaptor(PageAdaptor, Page)

  # Note that these don't call _make_target_adaptor because we don't have a handy reference to the
  # types being constructed. They don't have any default_sources behavior, so this should be ok,
  # but if we end up doing more things in _make_target_adaptor, we should make sure they're
  # applied here too.
  table['pants_plugin'] = PantsPluginAdaptor
  table['contrib_plugin'] = PantsPluginAdaptor

  return SymbolTable(table)
470050
private static Set<Class<?>> collectConverterClass(String scanPackageName) {
        Set<Class<?>> set = ClassUtil.getClassSet(scanPackageName);
        if (CollectionUtils.isEmpty(set)) {
            return Collections.emptySet();
        }
        Predicate<Class<?>> predicate = clazz -> clazz.isAnnotationPresent(Converter.class);
        return set.parallelStream().filter(predicate).collect(Collectors.toSet());
    }
541502
private IntermediateParseResults getEntityTypeFromSource(RepositoryCollection source) {
    IntermediateParseResults intermediateResults = parseTagsSheet(source.getRepository(EMX_TAGS));

    parsePackagesSheet(source.getRepository(EMX_PACKAGES), intermediateResults);
    parseEntitiesSheet(source.getRepository(EMX_ENTITIES), intermediateResults);
    parseAttributesSheet(source.getRepository(EMX_ATTRIBUTES), intermediateResults);
    reiterateToMapRefEntity(source.getRepository(EMX_ATTRIBUTES), intermediateResults);

    // languages tab
    if (source.hasRepository(EMX_LANGUAGES))
      parseLanguages(source.getRepository(EMX_LANGUAGES), intermediateResults);

    // i18nstrings tab
    if (source.hasRepository(EMX_I18NSTRINGS))
      parseI18nStrings(source.getRepository(EMX_I18NSTRINGS), intermediateResults);

    postProcessMetadata(intermediateResults);

    return intermediateResults;
  }
250585
EntityType createTargetMetadata(
      MappingTarget mappingTarget,
      String entityTypeId,
      String packageId,
      String label,
      Boolean addSourceAttribute) {
    EntityType targetMetadata =
        EntityType.newInstance(mappingTarget.getTarget(), DEEP_COPY_ATTRS, attrMetaFactory);
    targetMetadata.setId(entityTypeId);

    if (label != null) {
      targetMetadata.setLabel(label);
    } else {
      targetMetadata.setLabel(entityTypeId);
    }

    if (TRUE.equals(addSourceAttribute)) {
      targetMetadata.addAttribute(attrMetaFactory.create().setName(SOURCE));
    }

    if (dataService.hasRepository(entityTypeId)) {
      EntityType entityType =
          dataService
              .getMeta()
              .getEntityType(entityTypeId)
              .orElseThrow(() -> new UnknownEntityTypeException(entityTypeId));
      targetMetadata.setPackage(entityType.getPackage());
    } else if (packageId != null) {
      Package aPackage =
          dataService
              .getMeta()
              .getPackage(packageId)
              .orElseThrow(() -> new UnknownEntityException(PACKAGE, packageId));
      targetMetadata.setPackage(aPackage);
    } else {
      throw new MolgenisDataException("Package can't be null");
    }

    return targetMetadata;
  }
1084035
protected boolean isImportTargetPackage(ClassDesc classDesc, String importPackageName) {
    if (importPackageName == null) {
      return false;
    }
    if (importPackageName.isEmpty()) {
      return false;
    }
    if (importPackageName.equals(classDesc.getPackageName())) {
      return false;
    }
    if (importPackageName.equals("java.lang")) {
      return false;
    }
    return true;
  }
37109
private MessageResources lookupStrutsBundle(String name) {
        Object value = _servletContext.getAttribute(name);
        if(value instanceof MessageResources)
            return (MessageResources)value;
        else {
            if(value != null)
                LOGGER.warn("Can not resolve module bundle with name \"" +
                    name
                    + "\".  The object resolved from ServletContext is of type "
                    + value.getClass().toString());
            return null;
        }
    }
892882
public synchronized Morphia mapPackage(final String packageName, final boolean ignoreInvalidClasses) {
        try {
            for (final Class clazz : ReflectionUtils.getClasses(getClass().getClassLoader(), packageName,
                mapper.getOptions().isMapSubPackages())) {
                try {
                    final Embedded embeddedAnn = ReflectionUtils.getClassEmbeddedAnnotation(clazz);
                    final Entity entityAnn = ReflectionUtils.getClassEntityAnnotation(clazz);
                    final boolean isAbstract = Modifier.isAbstract(clazz.getModifiers());
                    if ((entityAnn != null || embeddedAnn != null) && !isAbstract) {
                        map(clazz);
                    }
                } catch (final MappingException ex) {
                    if (!ignoreInvalidClasses) {
                        throw ex;
                    }
                }
            }
            return this;
        } catch (IOException e) {
            throw new MappingException("Could not get map classes from package " + packageName, e);
        } catch (ClassNotFoundException e) {
            throw new MappingException("Could not get map classes from package " + packageName, e);
        }
    }
855627
public <S, T> FromUnmarshaller<S, T> findUnmarshaller(Class<S> source, Class<T> target) {
		return findUnmarshaller(new ConverterKey<S,T>(source, target, DefaultBinding.class));
	}
184688
public void convertPackage(PackageDoc pd, DocPath outputdir) {
        if (pd == null) {
            return;
        }
        ClassDoc[] cds = pd.allClasses();
        for (int i = 0; i < cds.length; i++) {
            // If -nodeprecated option is set and the class is marked as deprecated,
            // do not convert the package files to HTML. We do not check for
            // containing package deprecation since it is already check in
            // the calling method above.
            if (!(configuration.nodeprecated && Util.isDeprecated(cds[i])))
                convertClass(cds[i], outputdir);
        }
    }
1028357
String getTargetInternalName(String sourceInternalName, String targetPackage) {
        StringBuilder targetInternalName = new StringBuilder();
        targetInternalName.append(targetPackage.replaceAll("\\.", "/"));

        int lastSlashIndex = sourceInternalName.lastIndexOf('/');
        targetInternalName.append(sourceInternalName.substring(lastSlashIndex));

        return targetInternalName.toString();
    }
634125
@SuppressWarnings("unchecked")
  public <T extends R> Converter<S, T> getConverter(Class<T> targetType) {
    return (Converter<S, T>) converters.get(targetType);
  }
742577
public ConversionType getConversionTypeFor(XAbstractFeatureCall featureCall) {
		if (this.conversions == null) {
			this.conversions = initMapping();
		}
		final List<Object> receiver = new ArrayList<>();
		AbstractExpressionGenerator.buildCallReceiver(
				featureCall,
				this.keywords.getThisKeywordLambda(),
				this.referenceNameLambda,
				receiver);
		final String simpleName = AbstractExpressionGenerator.getCallSimpleName(
				featureCall,
				this.logicalContainerProvider,
				this.simpleNameProvider,
				this.keywords.getNullKeywordLambda(),
				this.keywords.getThisKeywordLambda(),
				this.keywords.getSuperKeywordLambda(),
				this.referenceNameLambda2);
		final List<Pair<FeaturePattern, FeatureReplacement>> struct = this.conversions.get(getKey(simpleName));
		if (struct != null) {
			final String replacementId = featureCall.getFeature().getIdentifier();
			final FeatureReplacement replacement = matchFirstPattern(struct, replacementId, simpleName, receiver);
			if (replacement != null) {
				if (replacement.hasReplacement()) {
					return ConversionType.EXPLICIT;
				}
				return ConversionType.FORBIDDEN_CONVERSION;
			}
		}
		return ConversionType.IMPLICIT;
	}
90421
@Nonnull
  public final Schema getSchema (@Nonnull final IReadableResource aResource)
  {
    ValueEnforcer.notNull (aResource, "Resource");

    return getFromCache (new CommonsArrayList <> (aResource));
  }