use of org.abs_models.frontend.ast.HasTypeParameters in project abstools by abstools.
the class JavaGeneratorHelper method generateTypeParameters.
public static void generateTypeParameters(PrintStream stream, Decl dtd, boolean plusExtends) {
List<TypeParameterDecl> typeParams = null;
if (dtd instanceof HasTypeParameters) {
typeParams = ((HasTypeParameters) dtd).getTypeParameters();
} else
return;
if (typeParams.getNumChild() > 0) {
stream.print("<");
boolean isFirst = true;
for (TypeParameterDecl d : typeParams) {
if (isFirst)
isFirst = false;
else
stream.print(",");
stream.print(d.getName());
if (plusExtends)
stream.print(" extends " + ABSValue.class.getName());
}
stream.print(">");
}
}
Aggregations