Skip to main content
summaryrefslogtreecommitdiffstats
blob: a0a88ade0a9ae29d0c9252681d959ebbfed2b420 (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
package org.eclipse.jdt.internal.compiler.env;

public class NameEnvironmentAnswer {
	// only one of the three can be set
	IBinaryType binaryType;
	ICompilationUnit compilationUnit;
	ISourceType sourceType;
public NameEnvironmentAnswer(IBinaryType binaryType) {
	this.binaryType = binaryType;
}
public NameEnvironmentAnswer(ICompilationUnit compilationUnit) {
	this.compilationUnit = compilationUnit;
}
public NameEnvironmentAnswer(ISourceType sourceType) {
	this.sourceType = sourceType;
}
/**
 * Answer the resolved binary form for the type or null if the
 * receiver represents a compilation unit or source type.
 */

public IBinaryType getBinaryType() {
	return binaryType;
}
/**
 * Answer the compilation unit or null if the
 * receiver represents a binary or source type.
 */

public ICompilationUnit getCompilationUnit() {
	return compilationUnit;
}
/**
 * Answer the unresolved source form for the type or null if the
 * receiver represents a compilation unit or binary type.
 */

public ISourceType getSourceType() {
	return sourceType;
}
/**
 * Answer whether the receiver contains the resolved binary form of the type.
 */

public boolean isBinaryType() {
	return binaryType != null;
}
/**
 * Answer whether the receiver contains the compilation unit which defines the type.
 */

public boolean isCompilationUnit() {
	return compilationUnit != null;
}
/**
 * Answer whether the receiver contains the unresolved source form of the type.
 */

public  boolean isSourceType() {
	return sourceType != null;
}
}

Back to the top