class ImportExtractor implements Serializable {

    List<String> getImportedPaths() {
        List<String> imports = new ArrayList<>();

        String strippedContent = removeComments();
        int indexFrom;
        int index = 0;
        while (index >= 0) {
            indexFrom = index;
            index = strippedContent.indexOf(IMPORT, indexFrom);
            if (index < 0) {
                break;
            }
            String betweenImports = strippedContent.substring(indexFrom, index)
                    .trim();
            if (!betweenImports.isEmpty() && !betweenImports.equals(";")) {
                break;
            }

            indexFrom = index + IMPORT.length();
            index = strippedContent.indexOf(";", indexFrom);
            if (index < 0) {
                index = strippedContent.indexOf("\n", indexFrom);
            }
            if (index < 0) {
                index = strippedContent.length();
            }
            String importStatement = strippedContent.substring(indexFrom, index)
                    .trim();

            int fromIndex = importStatement.indexOf(FROM);
            String path = importStatement;
            if (fromIndex >= 0) {
                path = importStatement.substring(fromIndex + FROM.length(),
                        importStatement.length()).trim();
            }
            imports.add(strip(path));
        }
        return imports;
    }

      ImportExtractor(String polymerCode);

}