Reputation: 282
I'm reading this research paper about a bug in an older JVM (Java 2 SDK 1.2). It declares a few classes like this
public class <Sup,L> {
public int f = 1;
}
and this
public class <java.lang.String,L> {
public int f = 1;
}
What does this syntax mean? Are these two classes called Sup and java.lang.String, are they generics, or is something else going on? Eclipse highlights the class decelerations with "Syntax error on tokens, InterfaceHeader expected instead."
Upvotes: 3
Views: 62
Reputation: 14383
from a brief browsing of the document, I understood that this is a schematic representation of Class and classLoder. "schematic" means that class <Sup,L>
is the format that the author chose to mean "Class Sup
that was loaded by Class Loader L
" this is not meant to be a JLS complient syntax.
Upvotes: 2