PageRenderTime 388ms CodeModel.GetById 200ms app.highlight 15ms RepoModel.GetById 167ms app.codeStats 0ms

/src/org/ooc/frontend/model/TypeParam.java

http://github.com/nddrylliog/ooc
Java | 54 lines | 40 code | 14 blank | 0 comment | 0 complexity | 96ec393ba829177934b5a27b80ffbe7f MD5 | raw file
 1package org.ooc.frontend.model;
 2
 3import java.io.IOException;
 4
 5import org.ooc.frontend.Visitor;
 6import org.ooc.frontend.model.tokens.Token;
 7
 8public class TypeParam extends TypeDecl {
 9
10	private Type type;
11	private Argument argument;
12	private boolean isGhost = false;
13	
14	public TypeParam(String name, Token startToken) {
15		super(name, null, null, startToken);
16		type = new Type("Class", Token.defaultToken);
17		argument = new RegularArgument(type, name, startToken);
18	}
19	
20	@Override
21	public boolean replace(Node oldie, Node kiddo) {
22		return false;
23	}
24
25	@Override
26	public Type getType() {
27		return type;
28	}
29	
30	public Argument getArgument() {
31		return argument;
32	}
33
34	public void accept(Visitor visitor) throws IOException {}
35
36	@Override
37	public void acceptChildren(Visitor visitor) throws IOException {
38		type.acceptChildren(visitor);
39	}
40
41	@Override
42	public boolean hasChildren() {
43		return true;
44	}
45	
46	public boolean isGhost() {
47		return isGhost;
48	}
49	
50	public void setGhost(boolean isGhost) {
51		this.isGhost = isGhost;
52	}
53	
54}