Skip to main content
summaryrefslogtreecommitdiffstats
blob: 9d73832fe6ac933e82c52802ef73fae9f382509e (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package org.eclipse.jdt.internal.core.builder.impl;

/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
import org.eclipse.jdt.internal.core.Assert;
import org.eclipse.jdt.internal.core.builder.*;

public abstract class NonStateSpecificHandleImpl implements IHandle {
public boolean equals(Object obj) {
	Assert.isTrue(false, "TBD");
	return false;
}
	public IDevelopmentContext getDevelopmentContext() {
		return getInternalDC();
	}
	abstract JavaDevelopmentContextImpl getInternalDC();
public IState getState() {
	throw new org.eclipse.jdt.internal.core.builder.StateSpecificException();
}
	/**
	 * Returns a consistent hash code for this object
	 */
	public abstract int hashCode();
	/**
	 * Returns a state-specific version of this handle in the current state
	 */
	protected IHandle inCurrentState() {
		return inState(getDevelopmentContext().getCurrentState());
	}
	/**
	 * Returns a state-specific version of this handle in the given state
	 */
	public abstract IHandle inState(IState s) throws org.eclipse.jdt.internal.core.builder.StateSpecificException;
public boolean isFictional() {
	return inCurrentState().isFictional();
}
public boolean isPresent() {
	return inCurrentState().isPresent();
}
public boolean isStateSpecific() {
	return false;
}
public abstract int kind();
public IHandle nonStateSpecific() {
	throw new org.eclipse.jdt.internal.core.builder.StateSpecificException();
}
/**
 * Converts an array of state-specific constructors to non-state-specific constructors.
 */
static IConstructor[] nonStateSpecific(IConstructor[] stateSpecific) {
	int len = stateSpecific.length;
	if (len == 0) return stateSpecific;
	IConstructor[] result = new IConstructor[len]; 
	for (int i = 0; i < len; ++i) {
		result[i] = (IConstructor) stateSpecific[i].nonStateSpecific();
	} 
	return result;
}
/**
 * Converts an array of state-specific fields to non-state-specific fields.
 */
static IField[] nonStateSpecific(IField[] stateSpecific) {
	int len = stateSpecific.length;
	if (len == 0) return stateSpecific;
	IField[] result = new IField[len]; 
	for (int i = 0; i < len; ++i) {
		result[i] = (IField) stateSpecific[i].nonStateSpecific();
	} 
	return result;
}
/**
 * Converts an array of state-specific methods to non-state-specific methods.
 */
static IMethod[] nonStateSpecific(IMethod[] stateSpecific) {
	int len = stateSpecific.length;
	if (len == 0) return stateSpecific;
	IMethod[] result = new IMethod[len]; 
	for (int i = 0; i < len; ++i) {
		result[i] = (IMethod) stateSpecific[i].nonStateSpecific();
	} 
	return result;
}
/**
 * Converts an array of state-specific packages to non-state-specific packages.
 */
static IPackage[] nonStateSpecific(IPackage[] stateSpecific) {
	int len = stateSpecific.length;
	if (len == 0) return stateSpecific;
	IPackage[] result = new IPackage[len]; 
	for (int i = 0; i < len; ++i) {
		result[i] = (IPackage) stateSpecific[i].nonStateSpecific();
	} 
	return result;
}
/**
 * Converts an array of state-specific types to non-state-specific types.
 */
static IType[] nonStateSpecific(IType[] stateSpecific) {
	int len = stateSpecific.length;
	if (len == 0) return stateSpecific;
	IType[] result = new IType[len]; 
	for (int i = 0; i < len; ++i) {
		result[i] = (IType) stateSpecific[i].nonStateSpecific();
	} 
	return result;
}
public String toString() {
	Assert.isTrue(false, "TBD");
	return null;
}
}

Back to the top