Skip to content

Commit 98f9f3e

Browse files
author
yevhenii-nadtochii
committed
Update docs to Expression addons
1 parent 5445eb7 commit 98f9f3e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

java/src/main/kotlin/io/spine/validation/java/protodata/CodeBlock.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import io.spine.protodata.java.Statement
3131
import io.spine.string.joinByLines
3232

3333
/**
34-
* A list of Java statements.
34+
* Represents one or more Java statements.
3535
*
3636
* An example of creating a code block:
3737
*
@@ -43,6 +43,7 @@ import io.spine.string.joinByLines
4343
* var violation = createViolation(fieldPath);
4444
* violations.add(violation);
4545
* }
46+
* return violations;
4647
* """.trimIndent()
4748
* )
4849
* ```

java/src/main/kotlin/io/spine/validation/java/protodata/MemberDeclaration.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ import io.spine.protodata.java.AnElement
3030

3131
/**
3232
* Represents class level member declaration.
33+
*
34+
* A class body may contain declarations of fields, methods, classes, and interfaces.
3335
*/
34-
// TODO:2025-01-31:yevhenii.nadtochii: Add `MethodDeclaration`. Also, `FieldDeclaration` is not
35-
// a statement, it should become a declaration too.
36-
// TODO:2025-01-31:yevhenii.nadtochii: Consider adding `Context<T>`. So, that instead of
37-
// `Expression<Message>.call("getField")` we could use `Context<Message>.call("getField").
38-
// We don't really an explicit `this` in the class context. It harms readability a bit.
3936
public open class MemberDeclaration(code: String) : AnElement(code)

0 commit comments

Comments
 (0)