Ejemplo n.º 1
0
  public static void main(String args[]) throws Exception {

    List<Object> api = ClassLoaderHelper.getClasses("org.eclipse.cdt.core");
    System.out.println("Total classes: " + api.size());

    launchReflectProcess(
        api,
        api2molTransformationPath,
        metamodelPath,
        modelPath,
        modelConfigurationPath,
        apiMetamodelDiscoveredPath,
        api2molTransformationDiscoveredPath);
  }
  /**
   * Loads the versionInfo.properties file from the AWS Java SDK and stores the information so that
   * the file doesn't have to be read the next time the data is needed.
   */
  private static void initializeVersion() {
    InputStream inputStream =
        ClassLoaderHelper.getResourceAsStream(VERSION_INFO_FILE, true, VersionInfoUtils.class);
    Properties versionInfoProperties = new Properties();
    try {
      if (inputStream == null) throw new Exception(VERSION_INFO_FILE + " not found on classpath");

      versionInfoProperties.load(inputStream);
      version = versionInfoProperties.getProperty("version");
      platform = versionInfoProperties.getProperty("platform");
    } catch (Exception e) {
      log.info("Unable to load version information for the running SDK: " + e.getMessage());
      version = "unknown-version";
      platform = "java";
    } finally {
      try {
        inputStream.close();
      } catch (Exception e) {
      }
    }
  }