1
2
3
4
5 package xjavadoc;
6
7 /***
8 * This class represents primitive types
9 *
10 * @author Ara Abrahamian
11 * @author Aslak Hellesøy
12 * @created February 17, 2002
13 */
14 final class Primitive extends AbstractClass
15 {
16 private final String _type;
17
18 public Primitive( XJavaDoc xJavaDoc, String name, String type )
19 {
20 super( xJavaDoc, null );
21 setQualifiedName( name );
22 _type = type;
23 }
24
25 public final String getType()
26 {
27 return _type;
28 }
29
30 public final boolean isPrimitive()
31 {
32 return !getQualifiedName().equals( "void" );
33 }
34
35 /***
36 * whether this class can be saved ( it can not )
37 *
38 * @return always false
39 */
40 public boolean isWriteable()
41 {
42 return false;
43 }
44
45 public XPackage getContainingPackage()
46 {
47 return null;
48 }
49
50 /***
51 * no op since it's not writeable
52 */
53 public void setDirty()
54 {
55 }
56
57 /***
58 * this class is not intended to be saved
59 *
60 * @return always false
61 */
62 public boolean saveNeeded()
63 {
64 return false;
65 }
66 }