}
private void unpackGenericSignature() {
- if (unpackedGenericSignature)
- return;
+ if (unpackedGenericSignature) { return; }
+ if (!world.isInJava5Mode()) {
+ this.genericFieldType = getReturnType();
+ return;
+ }
unpackedGenericSignature = true;
String gSig = field.getGenericSignature();
if (gSig != null) {
private void unpackGenericSignature() {
if (unpackedGenericSignature) return;
+ if (!world.isInJava5Mode()) {
+ this.genericReturnType = getReturnType();
+ this.genericParameterTypes = getParameterTypes();
+ return;
+ }
+ // ok, we have work to do...
unpackedGenericSignature = true;
String gSig = method.getGenericSignature();
if (gSig != null) {
private void unpackGenericSignature() {
if (genericSignatureUnpacked) return;
+ if (!getResolvedTypeX().getWorld().isInJava5Mode()) {
+ return;
+ }
genericSignatureUnpacked = true;
Signature.ClassSignature cSig = getGenericClassTypeSignature();
if (cSig != null) {
public void testCanBeParameterizedGenericMethod() {
BcelWorld world = new BcelWorld();
+ world.setBehaveInJava5Way(true);
ResolvedType javaLangClass = world.resolve(UnresolvedType.forName("java.lang.Class"));
javaLangClass = javaLangClass.getGenericType();
if (javaLangClass == null) return; // for < 1.5
public void testCanBeParameterizedMethodInGenericType() {
BcelWorld world = new BcelWorld();
+ world.setBehaveInJava5Way(true);
ResolvedType javaUtilList = world.resolve(UnresolvedType.forName("java.util.List"));
javaUtilList = javaUtilList.getGenericType();
if (javaUtilList == null) return; // for < 1.5