Package org.revapi
Class API
- java.lang.Object
-
- org.revapi.API
-
public final class API extends Object
Represents a set of archives that define an API.- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
API.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static API.Builder
builder()
Archive.Role
getArchiveRole(Archive archive)
Returns the role of the archive in the API.Iterable<? extends Archive>
getArchives()
Iterable<? extends Archive>
getSupplementaryArchives()
The set of archives that somehow supplement the main ones (for example they contain definitions used in the main archives).static API.Builder
of(Iterable<? extends Archive> archives)
static API.Builder
of(Archive... archives)
String
toString()
-
-
-
Constructor Detail
-
API
public API(Iterable<? extends Archive> archives, @Nullable Iterable<? extends Archive> supplementaryArchives)
- Parameters:
archives
- the archivessupplementaryArchives
- the supplementary archives- See Also:
getArchives()
,getSupplementaryArchives()
-
-
Method Detail
-
builder
public static API.Builder builder()
-
of
public static API.Builder of(Archive... archives)
-
of
public static API.Builder of(Iterable<? extends Archive> archives)
-
getArchives
public Iterable<? extends Archive> getArchives()
- Returns:
- The set of archives to check the API of.
-
getSupplementaryArchives
@Nullable public Iterable<? extends Archive> getSupplementaryArchives()
The set of archives that somehow supplement the main ones (for example they contain definitions used in the main archives). In Java, supplementary archives would be the JARs that need to be on the compilation classpath. Can be null if no such archives are needed.- Returns:
- the set of supplementary archives
-
getArchiveRole
public Archive.Role getArchiveRole(Archive archive)
Returns the role of the archive in the API.- Parameters:
archive
- the archive to check- Returns:
- the role of the archive in the API
-
-