What does :: mean class signature?

Now I play with ASM and analyze the signatures of the generators. The documented possible content in this section is described here and can be summarized with the following grammar:

TypeSignature: Z | C | B | S | me | F | J | D | FieldTypeSignature

FieldTypeSignature: ClassTypeSignature | [TypeSignature | Typevar

ClassTypeSignature: L Id (/ Id) TypeArgs? (Id TypeArgs?) *; *

TypeArgs: <typeArg +>

TypeArg: ** | (+ | -)? FieldTypeSignature *

Type Var: T Id;

However, I found for one case that this is not the case:

trait SomeTrait
class SomeClass[T <: SomeTrait]

Generics designation for SomeClass:<T::LSomeTrait;>Ljava/lang/Object;

, :: . : . , trait abstract class, :: : ().

?

+4
1

( 4.7.9.1. ):

ReferenceTypeSignature:
  ClassTypeSignature
  TypeVariableSignature
  ArrayTypeSignature
TypeParameters:
  < TypeParameter {TypeParameter} >
TypeParameter:
  Identifier ClassBound {InterfaceBound}
ClassBound:
  : [ReferenceTypeSignature]
InterfaceBound:
  : ReferenceTypeSignature

<T::LSomeTrait;> :

   TypeParameters
=> < TypeParameter {TypeParameter} >
=> < Identifier ClassBound {InterfaceBound} {TypeParameter} >
=> < T ClassBound {InterfaceBound} {TypeParameter} >
=> < T : [ReferenceTypeSignature] {InterfaceBound} {TypeParameter} >
=> < T : {InterfaceBound} {TypeParameter} >
=> < T : : ReferenceTypeSignature {TypeParameter} >
=> < T : : LSomeTrait; {TypeParameter} >
=> < T : : LSomeTrait; >
=> <T::LSomeTrait;>

, , . , , , .

, :

scala> trait T
defined trait T

scala> abstract class A
defined class A

scala> class C[X <: A with T]
defined class C

scala> :javap C
  Size 554 bytes
  MD5 checksum 6273d85df5987e350e7112726756a55f
  Compiled from "<console>"
public class C<X extends A & T> extends java.lang.Object
  minor version: 0
  major version: 50
  flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
   #1 = Utf8               C
   #2 = Class              #1             // C
   #3 = Utf8               <X:LA;:LT;>Ljava/lang/Object;
...
+3

All Articles