Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yevsyukov committed Feb 20, 2025
1 parent d793965 commit 16ff7d9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/main/kotlin/io/spine/protodata/ast/EnumTypeExts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.protodata.ast
* @return a new instance with the absolute path, or `this` if the file was already absolute.
* @throws IllegalArgumentException if the given path is not absolute, or
* if the given path is not an absolute version of the relative file set in
* this enum type prior to the call of this function.
* this enum type before the call of this function.
*/
public fun EnumType.withAbsoluteFile(path: File): EnumType =
replaceIfNotAbsoluteAlready(path) { copy { file = path } }
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import io.spine.protodata.type.TypeSystem
* @return a new instance with the absolute path, or `this` if the file was already absolute.
* @throws IllegalArgumentException if the given path is not absolute, or
* if the given path is not an absolute version of the relative file set in
* this message type prior to the call of this function.
* this message type before the call of this function.
*/
public fun MessageType.withAbsoluteFile(path: File): MessageType =
replaceIfNotAbsoluteAlready(path) { copy { file = path } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ private fun ProtoDeclaration.checkReplacingAbsoluteFile(path: File) {
* @param file The absolute path to be used instead of the relative one.
* @param block The function creating a new instance with the full path.
* @return a new instance with the full path or `this` if the file was already absolute.
* @throws IllegalArgumentException if the given path is not absolute, or
* if the given path is not an absolute version of the relative file set in
* this declaration before the call of this function.
*/
internal fun <T : ProtoDeclaration> T.replaceIfNotAbsoluteAlready(
file: File,
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/kotlin/io/spine/protodata/ast/ServiceExts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.protodata.ast
* @return a new instance with the absolute path, or `this` if the file was already absolute.
* @throws IllegalArgumentException if the given path is not absolute, or
* if the given path is not an absolute version of the relative file set in
* this service to the call of this function.
* this service before the call of this function.
*/
public fun Service.withAbsoluteFile(path: File): Service =
replaceIfNotAbsoluteAlready(path) { copy { file = path } }

0 comments on commit 16ff7d9

Please sign in to comment.