The companion object for the attribute in Scala does not have visibility issues in Scala:
trait ProtocolPacket extends Serializable { def toByteArray: Array[Byte] } object ProtocolPacket { def getStreamType( streamBytes: Array[Byte] ) = { // ... } }
However, on the Java side (for example, gets higher in the bank), ProtocolPacket.getStreamType
not displayed. In fact, the source (IDEA decompiled) does not have the getStreamType
method defined for ProtocolPacket
EDIT:
I found similar images to SO regarding Companion$MODULE$
, but was fooled by IDEA :), as shown below:

The above compiles and runs fine (the shell itself and / or IDEA) if someone falls into the trap.
source share