Interface ClassResolver.ClassUriImporter

    • Method Detail

      • tryImport

        Optional<JavaClass> tryImport​( uri)
        Try to import a JavaClass from the given URI, i.e. open a stream and use the default core import, to create a JavaClass from it.

        NOTE: ClassUriImporter has to be resilient against errors during import, e.g. IOExceptions or MalformedURLExceptions. Errors while reading from the given URI will always result in an Optional.absent() return value, no need to catch Exceptions.
        uri - The URI to import a JavaClass from
        Optional.of(importedClass), if the JavaClass could be successfully imported, otherwise Optional.absent()