diff options
Diffstat (limited to 'aspectj5rt')
-rw-r--r-- | aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java | 10 | ||||
-rw-r--r-- | aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java index 58305aeb1..71c6c7488 100644 --- a/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java +++ b/aspectj5rt/java5-src/org/aspectj/internal/lang/reflect/AjTypeImpl.java @@ -57,7 +57,7 @@ import org.aspectj.lang.reflect.Pointcut; * @author colyer * */ -public class AjTypeImpl<T> implements AjType { +public class AjTypeImpl<T> implements AjType<T> { private static final String ajcMagic = "ajc$"; @@ -170,11 +170,11 @@ public class AjTypeImpl<T> implements AjType { /* (non-Javadoc) * @see org.aspectj.lang.reflect.AjType#isAnnotationPresent(java.lang.Class) */ - public boolean isAnnotationPresent(Class annotationType) { + public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { return clazz.isAnnotationPresent(annotationType); } - public Annotation getAnnotation(Class annotationType) { + public <A extends Annotation> A getAnnotation(Class<A> annotationType) { return clazz.getAnnotation(annotationType); } @@ -714,14 +714,14 @@ public class AjTypeImpl<T> implements AjType { /* (non-Javadoc) * @see org.aspectj.lang.reflect.AjType#getEnumConstants() */ - public Object[] getEnumConstants() { + public T[] getEnumConstants() { return clazz.getEnumConstants(); } /* (non-Javadoc) * @see org.aspectj.lang.reflect.AjType#getTypeParameters() */ - public TypeVariable[] getTypeParameters() { + public TypeVariable<Class<T>>[] getTypeParameters() { return clazz.getTypeParameters(); } diff --git a/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java b/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java index 42d207804..7b1599549 100644 --- a/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java +++ b/aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java @@ -19,7 +19,7 @@ import org.aspectj.internal.lang.reflect.AjTypeImpl; */ public class AjTypeSystem { - public static AjType getAjType(Class fromClass) { - return new AjTypeImpl(fromClass); + public static <T> AjType<T> getAjType(Class<T> fromClass) { + return new AjTypeImpl<T>(fromClass); } } |