dev.polymodloader.api.system
이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.
| 형식 | 종류 | 설명 |
|---|---|---|
PolySystem | 인터페이스 | Marker for the contract interface of a replaceable system. |
SystemContext | 레코드 | Information passed to a SystemProvider when Poly Mod Loader creates the active implementation. |
SystemId | 레코드 | Identifier of a replaceable Poly Mod Loader system in namespace:path form, e.g. |
SystemLookup | 인터페이스 | Read access to the active implementation of each system. |
SystemProvider | 함수형 인터페이스 | Creates the implementation of one system. |
PolySystem
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface PolySystem
Marker for the contract interface of a replaceable system. Every system has exactly one active implementation: Poly Mod Loader's default or one explicit replacement declared by a mod (design doc §4.3, §4.4).
SystemContext
레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public record SystemContext(SystemId systemId, GameSide side, String providerModId)
Information passed to a SystemProvider when Poly Mod Loader creates the active implementation.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
systemId | SystemId | the system being created |
side | GameSide | the process side |
providerModId | String | mod that supplies the provider, or poly for the default |
SystemId
레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public record SystemId(String value)
Identifier of a replaceable Poly Mod Loader system in namespace:path form, e.g. poly:game_brand.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
value | String | the identifier text |
parse(String)
public static Optional<SystemId> parse(String value)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Parses value, or returns empty when it is not a valid system ID.
| 인자 | 타입 | 설명 |
|---|---|---|
value | String | — |
반환 Optional<SystemId>
SystemLookup
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface SystemLookup
Read access to the active implementation of each system.
get(Class<T>)
<T extends PolySystem> T get(Class<T> contract)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Returns the active implementation of contract.
| 인자 | 타입 | 설명 |
|---|---|---|
contract | Class<T> | — |
반환 T
예외 IllegalArgumentException — when no system with that contract is registered
SystemProvider
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface SystemProvider<T extends PolySystem>
Creates the implementation of one system. A mod that replaces a system declares its provider class in poly.mod.json under replacesSystems; the class needs a public no-argument constructor.
Timing: called once on the main thread after all mods are resolved and before any mod entrypoint runs.
Failure: an exception, a null result, or a result that does not implement the system's contract stops the launch (POLY-SYSTEM-003).
create(SystemContext)
T create(SystemContext context)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Creates the system implementation.
| 인자 | 타입 | 설명 |
|---|---|---|
context | SystemContext | — |
반환 T