From e52d5802484bb3e4cbde5ea7612ad958a6b2a2a6 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 12 Nov 2009 22:13:13 +0000 Subject: [PATCH] isCacheable true --- .../ReflectionBasedReferenceTypeDelegate.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java b/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java index 59d9bb3cf..16bf0c59b 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java @@ -79,11 +79,13 @@ public class ReflectionBasedReferenceTypeDelegate implements ReferenceTypeDelega public ReferenceType buildGenericType() { throw new UnsupportedOperationException("Shouldn't be asking for generic type at 1.4 source level or lower"); } + public boolean isAspect() { // we could do better than this in Java 5 by looking at the annotations // on the type... return false; } + /* * (non-Javadoc) * @@ -94,14 +96,16 @@ public class ReflectionBasedReferenceTypeDelegate implements ReferenceTypeDelega // on the type... return false; } - + public boolean isInterface() { return this.myClass.isInterface(); } + public boolean isEnum() { // cant be an enum in Java 1.4 or prior return false; } + /* * (non-Javadoc) * @@ -111,10 +115,12 @@ public class ReflectionBasedReferenceTypeDelegate implements ReferenceTypeDelega // cant be an annotation in Java 1.4 or prior return false; } -public boolean isAnnotation() { + + public boolean isAnnotation() { // cant be an annotation in Java 1.4 or prior return false; } + public String getRetentionPolicy() { // cant be an annotation in Java 1.4 or prior return null; @@ -127,6 +133,7 @@ public boolean isAnnotation() { public AnnotationTargetKind[] getAnnotationTargetKinds() { return null; } + public boolean isClass() { return !this.myClass.isInterface() && !this.myClass.isPrimitive() && !this.myClass.isArray(); } @@ -235,6 +242,10 @@ public boolean isAnnotation() { return interfaces; } + public boolean isCacheable() { + return true; + } + /* * (non-Javadoc) * -- 2.39.5