Lines 82-87
Link Here
|
82 |
addPackage(subPackageBinding); |
82 |
addPackage(subPackageBinding); |
83 |
return subPackageBinding; |
83 |
return subPackageBinding; |
84 |
} |
84 |
} |
|
|
85 |
/** |
86 |
* Compute the tagbits for standard annotations. For source types, these could require |
87 |
* lazily resolving corresponding annotation nodes, in case of forward references. |
88 |
* @see org.eclipse.jdt.internal.compiler.lookup.Binding#getAnnotationTagBits() |
89 |
* NOTE : when the name environment is based on the JavaModel, the synthetic |
90 |
* package-info type is not stored so the package's annotations will not be available. |
91 |
*/ |
92 |
public long getAnnotationTagBits() { |
93 |
if ((this.tagBits & TagBits.DeprecatedAnnotationResolved) != 0) |
94 |
return this.tagBits; |
95 |
|
96 |
this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); |
97 |
if (this.compoundName == CharOperation.NO_CHAR_CHAR) |
98 |
return this.tagBits; |
99 |
|
100 |
ReferenceBinding packageInfo = this.getType(TypeConstants.PACKAGE_INFO_NAME); |
101 |
if (packageInfo != null) |
102 |
this.tagBits |= (packageInfo.getAnnotationTagBits() & TagBits.AllStandardAnnotationsMask); |
103 |
return this.tagBits; |
104 |
} |
105 |
public long getDeprecatedAnnotationTagBits() { |
106 |
if ((this.tagBits & TagBits.DeprecatedAnnotationResolved) != 0) |
107 |
return this.tagBits; |
108 |
|
109 |
this.tagBits |= TagBits.DeprecatedAnnotationResolved; |
110 |
if (this.compoundName == CharOperation.NO_CHAR_CHAR) |
111 |
return this.tagBits; |
112 |
|
113 |
ReferenceBinding packageInfo = this.getType(TypeConstants.PACKAGE_INFO_NAME); |
114 |
if (packageInfo != null) |
115 |
packageInfo.initializeDeprecatedAnnotationTagBits(); |
116 |
return this.tagBits; |
117 |
} |
85 |
/* Answer the subpackage named name; ask the oracle for the package if its not in the cache. |
118 |
/* Answer the subpackage named name; ask the oracle for the package if its not in the cache. |
86 |
* Answer null if it could not be resolved. |
119 |
* Answer null if it could not be resolved. |
87 |
* |
120 |
* |
Lines 204-231
Link Here
|
204 |
|
237 |
|
205 |
return null; |
238 |
return null; |
206 |
} |
239 |
} |
207 |
|
|
|
208 |
/** |
209 |
* Compute the tagbits for standard annotations. For source types, these could require |
210 |
* lazily resolving corresponding annotation nodes, in case of forward references. |
211 |
* @see org.eclipse.jdt.internal.compiler.lookup.Binding#getAnnotationTagBits() |
212 |
* NOTE : when the name environment is based on the JavaModel, the synthetic |
213 |
* package-info type is not stored so the package's annotations will not be available. |
214 |
*/ |
215 |
public long getAnnotationTagBits() { |
216 |
if ((this.tagBits & TagBits.AnnotationResolved) != 0) |
217 |
return this.tagBits; |
218 |
|
219 |
this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved); |
220 |
if (this.compoundName == CharOperation.NO_CHAR_CHAR) |
221 |
return this.tagBits; |
222 |
|
223 |
ReferenceBinding packageInfo = this.getType(TypeConstants.PACKAGE_INFO_NAME); |
224 |
if (packageInfo != null) |
225 |
this.tagBits |= (packageInfo.getAnnotationTagBits() & TagBits.AllStandardAnnotationsMask); |
226 |
return this.tagBits; |
227 |
} |
228 |
|
229 |
/* API |
240 |
/* API |
230 |
* Answer the receiver's binding type from Binding.BindingID. |
241 |
* Answer the receiver's binding type from Binding.BindingID. |
231 |
*/ |
242 |
*/ |