ReferenceType rawType = (ReferenceType) world.resolve(javaUtilMap);
assertTrue("Should be the raw type ?!? " + rawType.getTypekind(), rawType.isRawType());
- ReferenceType genericType = (ReferenceType) rawType.getGenericType();
+ ReferenceType genericType = rawType.getGenericType();
assertTrue("Should be the generic type ?!? " + genericType.getTypekind(), genericType.isGenericType());
ResolvedType rt = rawType.getSuperclass();
public void testAnnotationFinderClassRetention() throws Exception {
ResolvedType type = world.resolve(AnnoTesting.class.getName());
ResolvedMember[] ms = type.getDeclaredMethods();
- int findMethod = findMethod("a", ms);
ResolvedMember methodWithOnlyClassLevelAnnotation = ms[findMethod("a", ms)];
ResolvedMember methodWithOnlyRuntimeLevelAnnotation = ms[findMethod("b", ms)];
/* *******************************************************************
* Copyright (c) 2009 Contributors.
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution and is available at
- * http://eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
* Andy Clement
* ******************************************************************/
package org.aspectj.weaver;
if (expectedResults.containsKey(rm.toString())) {
System.out.println("\nChecking: " + rm);
int i = 0;
- List/* String */sigs = (List) expectedResults.get(rm.toString());
+ List<String> sigs = expectedResults.get(rm.toString());
Iterator jpsi = rm.getJoinPointSignatures(w);
while (jpsi.hasNext()) {
ResolvedMember sig = (ResolvedMember) jpsi.next();
}
}
- public static Map expectedResults = new HashMap();
+ public static Map<String, List<String>> expectedResults = new HashMap<>();
static {
- List sigs = new ArrayList();
+ List<String> sigs = new ArrayList<String>();
sigs.add("java.lang.Object $Proxy1.get1(java.io.Serializable)");
sigs.add("java.lang.Object MessageService.get1(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get1(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get1(java.io.Serializable)");
expectedResults.put("java.lang.Object $Proxy1.get1(java.io.Serializable)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object $Proxy1.get2(java.io.Serializable)");
sigs.add("java.lang.Object MessageService.get2(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get2(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get2(java.io.Serializable)");
expectedResults.put("java.lang.Object $Proxy1.get2(java.io.Serializable)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object $Proxy1.get1(java.lang.Long)");
expectedResults.put("java.lang.Object $Proxy1.get1(java.lang.Long)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object GenericService.get1(java.io.Serializable)");
expectedResults.put("java.lang.Object GenericService.get1(java.io.Serializable)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object GenericService.get2(java.io.Serializable)");
expectedResults.put("java.lang.Object GenericService.get2(java.io.Serializable)", sigs);
}