Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 149-155
Link Here
|
149 |
this.fPackage = packageBinding; |
149 |
this.fPackage = packageBinding; |
150 |
this.fileName = binaryType.getFileName(); |
150 |
this.fileName = binaryType.getFileName(); |
151 |
|
151 |
|
152 |
char[] typeSignature = environment.globalOptions.sourceLevel >= ClassFileConstants.JDK1_5 ? binaryType.getGenericSignature() : null; |
152 |
char[] typeSignature = (environment.globalOptions.sourceLevel >= ClassFileConstants.JDK1_5 || environment.globalOptions.shouldRetainGenerics) ? binaryType.getGenericSignature() : null; |
153 |
this.typeVariables = typeSignature != null && typeSignature.length > 0 && typeSignature[0] == '<' |
153 |
this.typeVariables = typeSignature != null && typeSignature.length > 0 && typeSignature[0] == '<' |
154 |
? null // is initialized in cachePartsFrom (called from LookupEnvironment.createBinaryTypeFrom())... must set to null so isGenericType() answers true |
154 |
? null // is initialized in cachePartsFrom (called from LookupEnvironment.createBinaryTypeFrom())... must set to null so isGenericType() answers true |
155 |
: Binding.NO_TYPE_VARIABLES; |
155 |
: Binding.NO_TYPE_VARIABLES; |
Lines 262-268
Link Here
|
262 |
|
262 |
|
263 |
long sourceLevel = this.environment.globalOptions.sourceLevel; |
263 |
long sourceLevel = this.environment.globalOptions.sourceLevel; |
264 |
char[] typeSignature = null; |
264 |
char[] typeSignature = null; |
265 |
if (sourceLevel >= ClassFileConstants.JDK1_5) { |
265 |
if (sourceLevel >= ClassFileConstants.JDK1_5 || this.environment.globalOptions.shouldRetainGenerics) { |
266 |
typeSignature = binaryType.getGenericSignature(); |
266 |
typeSignature = binaryType.getGenericSignature(); |
267 |
this.tagBits |= binaryType.getTagBits(); |
267 |
this.tagBits |= binaryType.getTagBits(); |
268 |
} |
268 |
} |
Lines 360-366
Link Here
|
360 |
int size = iFields.length; |
360 |
int size = iFields.length; |
361 |
if (size > 0) { |
361 |
if (size > 0) { |
362 |
this.fields = new FieldBinding[size]; |
362 |
this.fields = new FieldBinding[size]; |
363 |
boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5; |
363 |
boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5 || this.environment.globalOptions.shouldRetainGenerics; |
364 |
boolean hasRestrictedAccess = hasRestrictedAccess(); |
364 |
boolean hasRestrictedAccess = hasRestrictedAccess(); |
365 |
int firstAnnotatedFieldIndex = -1; |
365 |
int firstAnnotatedFieldIndex = -1; |
366 |
for (int i = 0; i < size; i++) { |
366 |
for (int i = 0; i < size; i++) { |
Lines 411-417
Link Here
|
411 |
AnnotationBinding[][] paramAnnotations = null; |
411 |
AnnotationBinding[][] paramAnnotations = null; |
412 |
TypeBinding returnType = null; |
412 |
TypeBinding returnType = null; |
413 |
|
413 |
|
414 |
final boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5; |
414 |
final boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5 || this.environment.globalOptions.shouldRetainGenerics; |
415 |
char[] methodSignature = use15specifics ? method.getGenericSignature() : null; |
415 |
char[] methodSignature = use15specifics ? method.getGenericSignature() : null; |
416 |
if (methodSignature == null) { // no generics |
416 |
if (methodSignature == null) { // no generics |
417 |
char[] methodDescriptor = method.getMethodDescriptor(); // of the form (I[Ljava/jang/String;)V |
417 |
char[] methodDescriptor = method.getMethodDescriptor(); // of the form (I[Ljava/jang/String;)V |