blob: 9e9232b70213d17b47812c4164520b19f6e227c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.ws.internal.consumption.sampleapp.codegen;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.ws.internal.common.StringUtils;
import org.eclipse.jst.ws.internal.consumption.codegen.bean.TypeVisitor;
import org.eclipse.wst.ws.internal.datamodel.Element;
/**
* Objects of this class represent a InputFileHelp2Generator.
* */
public class InputFileHelp2Generator extends InputFileHelp1Generator
{
// Copyright
public static final String copyright = "(c) Copyright IBM Corporation 2000, 2002.";
/*
* This is actually used by the result generator to show the
* resultant Bean
* The name is the name the resultant bean is using as its instance name
*/
protected String fInstanceName;
private boolean fReturnParam=false;
/**
* Constructor.
*
*/
public InputFileHelp2Generator (StringBuffer buffer)
{
super(buffer);
fInstanceName="";
}
/**
* This is state data to be used by the generators
* @param String name The instance name of the parameters type bean
*/
public void setInstanceName(String name)
{
fInstanceName = name;
}
/**
* This is state data to be used by the generators
* @return String name The instance name of the parameters type bean
*/
public String getInstanceName()
{
return fInstanceName;
}
/*
* Takes in an object to be acted upon by this visitor action
* @param Object The object to be acted upon
*/
public IStatus visit (Object object)
{
Element parameterElement = (Element)object;
getVisitor();
fbuffer.append("<TABLE>" + StringUtils.NEWLINE);
TypeVisitor typeVisitor = new TypeVisitor();
InputFileTypeGenerator inputFileTypeGenerator = new InputFileTypeGenerator(fbuffer,0);
inputFileTypeGenerator.setReturnParam(getReturnParam());
inputFileTypeGenerator.setInstanceName(fInstanceName);
typeVisitor.run(parameterElement,inputFileTypeGenerator);
fbuffer = inputFileTypeGenerator.getStringBuffer();
fbuffer.append("</TABLE>" + StringUtils.NEWLINE);
return Status.OK_STATUS;
}
public boolean getReturnParam()
{
return fReturnParam;
}
public void setReturnParam(boolean returnParam)
{
fReturnParam = returnParam;
}
}
|