/* * The JastAdd Extensible Java Compiler (http://jastadd.org) is covered * by the modified BSD License. You should have received a copy of the * modified BSD license with this compiler. * * Copyright (c) 2005-2008, Torbjorn Ekman * All rights reserved. */ aspect IntertypeConstructorPrettyPrint { public void IntertypeConstructorDecl.toString(StringBuffer s) { s.append(indent()); s.append("/*"); getModifiers().toString(s); getTargetType().toString(s); s.append("." + name() + "("); if(getNumParameter() > 0) { getParameter(0).toString(s); for(int i = 1; i < getNumParameter(); i++) { s.append(", "); getParameter(i).toString(s); } } s.append(")"); if(getNumException() > 0) { s.append(" throws "); getException(0).toString(s); for(int i = 1; i < getNumException(); i++) { s.append(", "); getException(i).toString(s); } } s.append(" {"); if(hasConstructorInvocation()) { getConstructorInvocation().toString(s); } for(int i = 0; i < getBlock().getNumStmt(); i++) { getBlock().getStmt(i).toString(s); } s.append(indent()); s.append("}"); s.append("*/"); } }