Skip to content

Commit

Permalink
Fix docstrings as per PR discussion (formatting, @param)
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Mar 23, 2024
1 parent ee0d3aa commit cbb2527
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions shared/src/main/scala/io/kaitai/struct/datatype/DataType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ object DataType {
) extends StructType {
var classSpec: Option[ClassSpec] = None
/**
* Determines whether the user type represented by this `UserType` instance
* is external from the perspective of the given `ClassSpec` in which it is
* used (via `seq`, `instances` or `params`).
*/
* Determines whether the user type represented by this `UserType` instance
* is external from the perspective of the given `ClassSpec` in which it is
* used (via `seq`, `instances` or `params`).
* @param curClass class spec from which the local/external relationship
* should be evaluated
*/
def isExternal(curClass: ClassSpec): Boolean =
classSpec.get.isExternal(curClass)
def isOpaque = {
Expand Down
10 changes: 6 additions & 4 deletions shared/src/main/scala/io/kaitai/struct/format/ClassSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ case class ClassSpec(
def parentType: DataType = parentClass.toDataType

/**
* Determines whether this `ClassSpec` represents a type that is external
* (i.e. not defined in the same .ksy file) from the perspective of the given
* `ClassSpec`.
*/
* Determines whether this `ClassSpec` represents a type that is external
* (i.e. not defined in the same .ksy file) from the perspective of the given
* `ClassSpec`.
* @param curClass class spec from which the local/external relationship
* should be evaluated
*/
def isExternal(curClass: ClassSpec): Boolean =
name.head != curClass.name.head

Expand Down

0 comments on commit cbb2527

Please sign in to comment.