-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce
Installation<T>
interface (#710)
* chore: rename game.Installation >>> game.GameInstallation * chore: add `Installation<T>` interface (intended for both JRE and game installations) * chore: make `GameInstallation` implement `Installation<GameIdentifier>`` * chore: remove (deprecated) `GameManager::getInstalledVersion` * fix: don't try to read verison info from JAR in GameInstallation::getInfo * qa: fix checkstyle issues Co-authored-by: jdrueckert <[email protected]>
- Loading branch information
1 parent
223ef54
commit 79c8a99
Showing
8 changed files
with
95 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/org/terasology/launcher/io/Installation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2023 The Terasology Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.terasology.launcher.io; | ||
|
||
import java.nio.file.Path; | ||
|
||
//TODO: define behavior in error cases, annotate non-null, etc. | ||
public interface Installation<T> { | ||
|
||
/** | ||
* @return The full path to the location of the installation. | ||
*/ | ||
Path getPath(); | ||
|
||
/** | ||
* @return The information object describing <i>what</i> is installed. | ||
*/ | ||
T getInfo(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters