1
2
3
4
5 package xjavadoc;
6
7 /***
8 * Implementation of Type for method return types.
9 *
10 * @author Aslak Hellesøy
11 * @created 20. mars 2003
12 * @version $Revision: 1.3 $
13 */
14 class ReturnType extends AbstractType
15 {
16 private MethodImpl _method;
17 private String _dimensionAsString;
18 private XClass _type;
19 private String _typeString = "void";
20 private int _dimension = 0;
21
22 public ReturnType( MethodImpl method )
23 {
24 _method = method;
25 }
26
27 public String getDimensionAsString()
28 {
29 if( _dimensionAsString == null )
30 {
31 _dimensionAsString = Util.appendDimensionAsString( getDimension(), new StringBuffer() ).toString();
32 }
33 return _dimensionAsString;
34 }
35
36 public XClass getType()
37 {
38 if( _type == null )
39 {
40 _type = _method.getContainingAbstractClass().qualify( _typeString );
41 }
42 return _type;
43 }
44
45 public int getDimension()
46 {
47 return _dimension;
48 }
49
50 public void setDimension( int dimension )
51 {
52 _dimension = dimension;
53 }
54
55 public void setType( String typeString )
56 {
57 _typeString = typeString;
58 }
59 }