| 1 | // |
| 2 | // (c) Copyright, Moebius Solutions, 2002 |
| 3 | // |
| 4 | // All Rights Reserved |
| 5 | // |
| 6 | // This material may be reproduced by or for the U. S. Government |
| 7 | // pursuant to the copyright license under the clause at |
| 8 | // DFARS 252.227-7013 (OCT 1988). |
| 9 | // |
| 10 | /* |
| 11 | * $Id: JavaSignatureParamsVisitor.java,v 1.1.1.5 2004/05/25 20:23:28 hastings Exp $ |
| 12 | */ |
| 13 | package com.moesol.generator; |
| 14 | |
| 15 | import java.io.*; |
| 16 | import com.moesol.generator.core.*; |
| 17 | import com.moesol.generator.printer.*; |
| 18 | import com.moesol.generator.visitor.*; |
| 19 | |
| 20 | public class JavaSignatureParamsVisitor implements ParamTypeVisitor{ |
| 21 | public JavaSignatureParamsVisitor(Writer out) { |
| 22 | this.out = out; |
| 23 | } |
| 24 | public void visitParamType(Class c, int nparam, Class paramType) throws ApplyException { |
| 25 | try { |
| 26 | JavaTypePrinter.getInstance().print(paramType, out); |
| 27 | } catch (IOException e) { |
| 28 | throw new ApplyException(e); |
| 29 | } |
| 30 | } |
| 31 | public void visitParamSeparator(Class c) throws ApplyException { |
| 32 | try { |
| 33 | out.write(","); |
| 34 | } catch (IOException e) { |
| 35 | throw new ApplyException(e); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | private Writer out; |
| 40 | } |