|
org.netbeans.modules.project.libraries/1 1.29.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.spi.project.libraries.support.LibrariesSupport
public final class LibrariesSupport
SPI Support class. Provides factory method for creating instance of the default LibraryImplementation.
Method Summary | |
---|---|
static URI |
convertFilePathToURI(String path)
Properly converts possibly relative file path to URI. |
static String |
convertURIToFilePath(URI uri)
Properly converts possibly relative URI to file path. |
static LibraryImplementation |
createLibraryImplementation(String libraryType,
String[] volumeTypes)
Creates default LibraryImplementation |
static URI |
getArchiveFile(URI uri)
Returns the URI of the archive file containing the file referred to by a jar -protocol URL. |
static URI |
getArchiveRoot(URI uri)
Returns a URI representing the root of an archive. |
static LibraryTypeProvider |
getLibraryTypeProvider(String libraryType)
Returns registered LibraryTypeProvider for given library type. |
static LibraryTypeProvider[] |
getLibraryTypeProviders()
Returns all registered LibraryTypeProvider s. |
static FileObject |
resolveLibraryEntryFileObject(URL libraryLocation,
URI libraryEntry)
Helper method to resolve (possibly relative) library content URI to FileObject. |
static URI |
resolveLibraryEntryURI(URL libraryLocation,
URI libraryEntry)
Helper method to resolve (possibly relative) library content URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LibraryImplementation createLibraryImplementation(String libraryType, String[] volumeTypes)
libraryType
- type of libraryvolumeTypes
- types of supported volumes
public static LibraryTypeProvider getLibraryTypeProvider(String libraryType)
LibraryTypeProvider
for given library type. This method
is mostly used by LibraryProvider
implementators.
libraryType
- the type of library for which the provider should be returned.
LibraryTypeProvider
for given library type or null, if none is registered.public static LibraryTypeProvider[] getLibraryTypeProviders()
LibraryTypeProvider
s. This method
is mostly used by LibraryProvider
implementators.
LibraryTypeProvider
, never returns null.public static URI convertFilePathToURI(String path)
path
- file path to convert; can be relative; cannot be null
public static String convertURIToFilePath(URI uri)
uri
- URI convert; can be relative URI; cannot be null
public static FileObject resolveLibraryEntryFileObject(URL libraryLocation, URI libraryEntry)
libraryLocation
- library location file; can be null for global librarieslibraryEntry
- library entry to resolve
public static URI resolveLibraryEntryURI(URL libraryLocation, URI libraryEntry)
libraryLocation
- library location filelibraryEntry
- relative library entry to resolve
public static URI getArchiveFile(URI uri)
jar
-protocol URL.
Remember that any path within the archive is discarded
so you may need to check for non-root entries.
uri
- a URI; can be relative URI
jar
-protocol URI containing !/
public static URI getArchiveRoot(URI uri)
uri
- of a ZIP- (or JAR-) format archive file; can be relative
jar
-protocol URI of the root of the archive
|
org.netbeans.modules.project.libraries/1 1.29.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |