blob: 0b3447de6f46250f2b718089cd7c90423e12fd05 (
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
|
package org.eclipse.cdt.internal.core.dom;
import java.util.LinkedList;
import java.util.List;
public class SimpleDeclaration extends Declaration implements DeclarationSpecifier.Container{
private DeclarationSpecifier declSpec = null;
public DeclarationSpecifier getDeclSpecifier()
{
if( declSpec == null )
declSpec = new DeclarationSpecifier();
return declSpec;
}
public void setDeclSpecifier( DeclarationSpecifier in )
{
declSpec = in;
}
/**
* This is valid when the type is t_type. It points to a
* classSpecifier, etc.
*/
private TypeSpecifier typeSpecifier;
/**
* Returns the typeSpecifier.
* @return TypeSpecifier
*/
public TypeSpecifier getTypeSpecifier() {
return typeSpecifier;
}
/**
* Sets the typeSpecifier.
* @param typeSpecifier The typeSpecifier to set
*/
public void setTypeSpecifier(TypeSpecifier typeSpecifier) {
getDeclSpecifier().setType(DeclarationSpecifier.t_type);
this.typeSpecifier = typeSpecifier;
}
private List declarators = new LinkedList();
public void addDeclarator(Declarator declarator) {
declarators.add(declarator);
}
public List getDeclarators() {
return declarators;
}
}
|