#sleela 3.0 import java.jdk-28; material; < Java container: the names used here are housed in /lib/java (selected by the import above) and are not part of the SLeeLa specification, see SLEELA.syntax 38.4. > << Shows the SLeeLa generics method on lib/java/jdk-28 types: classes carry no Java type parameters (erasure to Any); each records them as data, and an instance can record the type arguments its caller means. >> class GenericsRun { void main() { print(HashMap.genericTypeParameters()); print(HashMap.genericTypeParameterCount()); print(HashMap.genericTypeParameterName(1)); HashMap m = new HashMap(); String[] args = new String[2]; args[0] = "java.lang.String"; args[1] = "java.lang.Integer"; m.bindGenericTypeArguments(args); print(m.genericTypeArgumentCount()); print(m.genericTypeArgument(0) + ", " + m.genericTypeArgument(1)); print(m.genericTypeArgument(2) == null); ArrayList list = new ArrayList(); print(list.genericTypeArgumentCount()); print(Math.genericTypeParameters() == ""); print(Enum.genericTypeParameters()); } }