コード例 #1
0
  protected static void addRequirePackage(
      ClassLoadingMetaData classLoadingMetaData, Class<?> pck, VersionRange versionRange) {
    RequirementsMetaData requirements = classLoadingMetaData.getRequirements();

    Requirement requirement =
        classLoadingMetaDataFactory.createRequirePackage(pck.getPackage().getName(), versionRange);
    requirements.addRequirement(requirement);
  }
コード例 #2
0
  protected static void addRequireModule(
      ClassLoadingMetaData classLoadingMetaData, String moduleName, VersionRange versionRange) {
    RequirementsMetaData requirements = classLoadingMetaData.getRequirements();

    Requirement requirement =
        classLoadingMetaDataFactory.createRequireModule(moduleName, versionRange);
    requirements.addRequirement(requirement);
  }